Re: C api - mysql_list_fields

2008-10-07 Thread Joerg Bruehe
Hi Mike, all, Mike Aubury wrote: I'm probably being a bit stupid - but I'm trying to determine (in code) the length of the string in the schema for a given table. So - for example : create table a ( blah char(20) ) I want to return '20', but I'm

Re: C api - mysql_list_fields

2008-10-07 Thread Mike Aubury
Basically - so I can display it in the same form as the orginal table.. Or - if you want the longer version I work with an Opensource project called 'Aubit4GL' (its a clone of Informix4GL - which allows you to write really nice screen based database oriented programs + reports), see

Re: C api - mysql_list_fields

2008-10-07 Thread Joerg Bruehe
Mike, all, Mike Aubury wrote: [[...]] So - the next question is... Is there anyway in code I can find the 'fiddle' factor (1,3,or now possibly 4) that I need to use to divide by to get back to the character width specified in the CREATE TABLE ? In the information_schema database,

Re: C api - mysql_list_fields

2008-10-07 Thread Doug Bridgens
It works for me, I used your code: Field =mycol Type=254 Length=20 so at least your code is fine, and the problem must be somewhere else. I am using RH EL3. cheers, Doug On 6 Oct 2008, at 19:52, Mike Aubury wrote: I'm probably being a bit stupid - but I'm trying to determine (in code)

Re: C api - mysql_list_fields

2008-10-07 Thread walter harms
Mike Aubury schrieb: Excellent - this seems to be the issue - the show create table shows : mysql show create table a\g +---++ | Table | Create Table

Re: C api - mysql_list_fields

2008-10-07 Thread Mike Aubury
Excellent - this seems to be the issue - the show create table shows : mysql show create table a\g +---++ | Table | Create Table

Re: C api - mysql_list_fields

2008-10-07 Thread Simon J Mudd
[EMAIL PROTECTED] (Mike Aubury) writes: I'm probably being a bit stupid - but I'm trying to determine (in code) the length of the string in the schema for a given table. So - for example : create table a ( blah char(20) ) I want to return '20', but I'm

C api - mysql_list_fields

2008-10-06 Thread Mike Aubury
I'm probably being a bit stupid - but I'm trying to determine (in code) the length of the string in the schema for a given table. So - for example : create table a ( blah char(20) ) I want to return '20', but I'm getting '60' when I use mysql_list_fields..