List:MySQL ODBC« Previous MessageNext Message »
From:<jbonnett Date:April 23 2006 11:52pm
Subject:RE: Show columns from table like 'field' and odbc 3.51.12
View as plain text  
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@stripped
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@stripped] 
Sent: Friday, 21 April 2006 11:46 PM
To: myodbc@stripped
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={MySQL ODBC 3.51 Driver};" & _
         "SERVER=www.unifr.ch;" & _
         "DATABASE=...;" & _
         "USER=...;" & _
         "PASSWORD=...;"
         
     SQL = "SHOW COLUMNS FROM `jrn` LIKE 'dom'"
     Rec.CursorLocation = 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çois Rappaz


Thread
Show columns from table like 'field' and odbc 3.51.12RAPPAZ Francois21 Apr
RE: Show columns from table like 'field' and odbc 3.51.12jbonnett24 Apr