output to struct
-
hi all! im not sure but i guess i should have posted my question in this forum since it concerns sql... my question is regarding querying the database which results in multiple records which should be mapped to struct. can someone please show me how to do this? i have written vc++ code which queries the database but have only done this with 1 result which contains a few number of fiels which i have assigned to individual variables :( now what i would like is to create an array of structs based on multiple records which was selected based on the query. thanks for any help! newbie :)
-
hi all! im not sure but i guess i should have posted my question in this forum since it concerns sql... my question is regarding querying the database which results in multiple records which should be mapped to struct. can someone please show me how to do this? i have written vc++ code which queries the database but have only done this with 1 result which contains a few number of fiels which i have assigned to individual variables :( now what i would like is to create an array of structs based on multiple records which was selected based on the query. thanks for any help! newbie :)
You do this in C++ code. Create a vector of structs, and for each row, read the values, build an instance of the struct, and push it into the vector.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )