How to store mysql data in result set for future use.
Example : I will query a table and store in result set . I can able to use same result set whenever required .
I’m not sure about the question but I’ll try to answer it anyway
what I do is reading all the data from the result set to my custom data. It can be a map or an array of structs. Depending on the data you fetch in the query. In the end of mapping, I close the result with the
Close() function and operate with my copy of the data.
I understand your approach but copying same data in maps or array is not good idea( it will take time for scanning and copy ). Can we keep it in memory address and can we use multiple time.
is it really the issue for you? The coping isn’t that slow. Did you measure it?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.