Incorrect Column Type!!

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am a newbie and struggling to get the correct Column "Type". I really
appreciate if someone can shed some light here..

I have a table XXX which has 4 columns with types char(2), varchar(5),
int(10) and int(10) respectively.

But, when I use the following code, I don't get the correct type from
MYSQL_FIELD structure!!

int nSuccess = mysql_query ( (MYSQL*)m_hdb, "select * from XXX" );
if ( nSuccess == 0 ) {
MYSQL_RES *Result = mysql_store_result ( (MYSQL*)m_hdb );
if ( Result ) {
for ( int i = 0; msField = mysql_fetch_field ( m_Result ); i++ ) {
printf ( "Column Name is %s\n", msField->name );

When I am looking the msField->type values in the "Watch" window, I see
MYSQL_TYPE_LONG, MYSQL_TYPE_LONG, 1098016098 and 191985148

Am I missing something here or is there a problem with the call

Thanks in advance.

- Venkat

Site Timeline