473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Incorrect Column Type!!

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 ) {
MYSQL_FIELD *msField;
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
respectively!!

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

Thanks in advance.

- Venkat

Aug 4 '05 #1
0 1305

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: chris | last post by:
What is the recommended way of storing 10 digit phone numbers? I like bigint(10), but it seems most are using varchar? Or I've also seen 2 int columns, one for area code and another for the rest...
3
by: Jeff Godfrey | last post by:
I am putting together a SQL table which will hold a latitude and longitude for each record. An example of a latitude is: 47 05 36.5 Which column type would best represent this and retain the...
0
by: Dan Hartshorn | last post by:
VS.NET 2003, C#, Windows Server 2003. I have a datagrid and I want the last column to be either an EditCommandColumn or a template column, depending on a value I have. The value changes for each...
4
by: Ying Lu | last post by:
Hello, Under mysql, we have "desc tablename" to get the detail information about a table. My question is about to get column name, and column type for a specific table under PostgreSQL through...
2
by: Bill Nguyen | last post by:
I'm learning DatagridView. How do I define a checkbox column type? Thanks Bill
1
by: lee1212 | last post by:
Hi I use vb.Net to open an access db for my software and i have one issue that i don't know how to do, I need to change an exsiting Column that might have some records in it from Text(250) to Memo...
1
by: gomzi | last post by:
hi, I would like to know as to what the column type should be, in case i want to store some text in the encrypted format. i m using md5 alogrithm available in .net. I tried using binary, but it...
4
by: pks83 | last post by:
In MSSQL I am using datetime as the column type and trying to execute the below mentioned query select time from tickets where ticket_id = '1'; when i execute the query on sql manager window it...
0
by: lucindaa | last post by:
Hi EveryBody, i have a problem in setting the column type of datagrid dynamically in C# .Net Windows App. i am generating the grid automatically by assigning datasource of a datatable the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.