all groups > sql server odbc > june 2005 >
You're in the

sql server odbc

group:

Retrieving entire columns from a resultset



Retrieving entire columns from a resultset MithilaP
6/24/2005 11:26:03 AM
sql server odbc: Hi,

I would like to know if there is anyway of retreiving an entire column of
data from a resultset into say an array or a vector.

e.g. If the resultset contains columns ID (int), Name(varchar), age(int)
then I'd like retrieve the ID values from each tuple in one go into say an
int array or a vector.

(I am using a mysql database and a mysql ODBC driver to connect to it)

Thanks,
Re: Retrieving entire columns from a resultset Scot T Brennecke
6/24/2005 11:59:58 PM
It sounds like you may be able to use what's called "bulk row fetching".
What language, version, libraries, etc. are you using?

In article <F6874AB5-D7C4-4B22-A675-FAA2F3039DE0@microsoft.com>,
MithilaP@discussions.microsoft.com says...
[quoted text, click to view]
Re: Retrieving entire columns from a resultset MithilaP
6/28/2005 10:17:05 AM
Hi,

I am using C++ (compatible with visual studio 6), mysql odbc driver 3.51,
mysql 4.0.12.

Thanks,
Mithila

[quoted text, click to view]
Re: Retrieving entire columns from a resultset Scot T Brennecke
6/28/2005 4:10:25 PM
Are you using MFC and a class derived from CRecordset to perform the
ODBC? If so, you can use the built-in support for "bulk record field
exchange" in your application. If not using MFC, you can still use the
same methodology that MFC uses and call the ODBC functions directly, if
you look at the MFC source code and the DBFETCH sample.

In article <35887A32-F785-4841-A46A-202CA49B19B3@microsoft.com>,
MithilaP@discussions.microsoft.com says...
[quoted text, click to view]
AddThis Social Bookmark Button