Show columns from table like 'field' and odbc 3.51.12

Hello list

I would like to get the enum or set members from a field in ms access, =
and connect to mysql using ADO. The recordset is made without problem =
but the Type field is truncated in the recordset. Is there a work around =
?

I tried to loop in the recordset, but it's no use.

here is my code:

Dim Cnt As New ADODB.Connection
Dim Rec As New ADODB.Recordset
Cnt.Open _
"DRIVER=3D{MySQL ODBC 3.51 Driver};" & _
"SERVER=3Dwww.unifr.ch;" & _
"DATABASE=3D...;" & _
"USER=3D...;" & _
"PASSWORD=3D...;"

SQL =3D "SHOW COLUMNS FROM `jrn` LIKE 'dom'"
Rec.CursorLocation =3D adUseClient
Rec.Open SQL, Cnt, adOpenKeyset, adLockOptimistic
Rec.MoveFirst
Do While Not Rec.EOF

Debug.Print Rec!Type
Rec.MoveNext
Loop

Thanks for any help !

Fran=E7ois Rappaz


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc [at] m.gmane.o rg
RAPPAZ Francois [ Fr, 21 April 2006 16:15 ] [ ID #1282618 ]

RE: Show columns from table like 'field' and odbc 3.51.12

I tried your code, modifying it a little to suit my database and it =
seems to work just fine.

Listing all the columns from one of my tables gave this result

int(11)
varchar(5)
varchar(255)
int(11)
int(11)
int(11)
float
float
float
float
float
float
float
int(11)
float
float

What exactly were you getting?

John Bonnett

Computer Scientist
Product R&D
Carl Zeiss Vision GmbH
Lonsdale, South Australia

Phone: +61 8 8392 8366
Fax: +61 8 8392 8400
Email: jbonnett [at] czv.com.au
http://www.carlzeissvision.com/

This email, including any attachments, is intended for the sole use of =
the intended recipient(s) and may contain information
that is confidential, privileged and/or the sender's work. Any review or =
distribution by any other person is prohibited. If you
are not an intended recipient, please immediately contact the sender and =
delete all copies.

-----Original Message-----
From: RAPPAZ Francois [mailto:francois.rappaz [at] unifr.ch]
Sent: Friday, 21 April 2006 11:46 PM
To: myodbc [at] lists.mysql.com
Subject: Show columns from table like 'field' and odbc 3.51.12

Hello list

I would like to get the enum or set members from a field in ms access, =
and connect to mysql using ADO. The recordset is made without problem =
but the Type field is truncated in the recordset. Is there a work around =
?

I tried to loop in the recordset, but it's no use.

here is my code:

Dim Cnt As New ADODB.Connection
Dim Rec As New ADODB.Recordset
Cnt.Open _
"DRIVER=3D{MySQL ODBC 3.51 Driver};" & _
"SERVER=3Dwww.unifr.ch;" & _
"DATABASE=3D...;" & _
"USER=3D...;" & _
"PASSWORD=3D...;"

SQL =3D "SHOW COLUMNS FROM `jrn` LIKE 'dom'"
Rec.CursorLocation =3D adUseClient
Rec.Open SQL, Cnt, adOpenKeyset, adLockOptimistic
Rec.MoveFirst
Do While Not Rec.EOF

Debug.Print Rec!Type
Rec.MoveNext
Loop

Thanks for any help !

Fran=E7ois Rappaz



--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc [at] m.gmane.o rg
jbonnett [ Mo, 24 April 2006 01:52 ] [ ID #1286979 ]
Datenbanken » gmane.comp.db.mysql.odbc » Show columns from table like 'field' and odbc 3.51.12

Vorheriges Thema: Problem with update.
Nächstes Thema: Invitation from eela24_winnie@yahoo.com to join MuslimSpace.com