batmanforever
Programmer
Hi,
I have a C code on Win2k machine [ purely C code, not MFC ] that reads off an MS excel database (Office 2k version ).
All is well, expcet that I now need some kind of array handling in my SQL queries.
Here is what I am doing now is:
Pass a number ID value from my C code as a parameter to the SQL SELECT stmt.
So, the SELECT stmt looks like this...
wsprintf( szSql," SELECT Code, StreetID, StreetName FROM [Det$] WHERE Code = %lu OR Code =%lu ORDER BY Code, StreetID", scodeID0, socdeID1);
What I want to do is:
Since, I dont know at compile time, how many ID's I will be searching for, ie I dont know the number of scodeID's, How do I make it read from an array which has these values ?
my C code will first fill in an array with ID values at runtime. This will be fed to the SELECT stmt and it has do do the iteration for the values in the array.
I hope u understood the problem
I have a C code on Win2k machine [ purely C code, not MFC ] that reads off an MS excel database (Office 2k version ).
All is well, expcet that I now need some kind of array handling in my SQL queries.
Here is what I am doing now is:
Pass a number ID value from my C code as a parameter to the SQL SELECT stmt.
So, the SELECT stmt looks like this...
wsprintf( szSql," SELECT Code, StreetID, StreetName FROM [Det$] WHERE Code = %lu OR Code =%lu ORDER BY Code, StreetID", scodeID0, socdeID1);
What I want to do is:
Since, I dont know at compile time, how many ID's I will be searching for, ie I dont know the number of scodeID's, How do I make it read from an array which has these values ?
my C code will first fill in an array with ID values at runtime. This will be fed to the SELECT stmt and it has do do the iteration for the values in the array.
I hope u understood the problem