MySQL Forums
Forum List  »  Connector/ODBC

TEXT, MEDIUMTEXT type field problems with MyODBC
Posted by: Oscar
Date: December 13, 2004 09:23AM

Hi,

When i use a Table that contains TEXT type fields, don't work. When i tried to use recordset.recordcount, Visual Basic advised with the E_FAIL error.

If i change the table and use any that haven't TEXT type field, works fine.

MyODBC is 3.51.10 and the MySQL is 4.0.18-nt.

Any sugestions!

Thanks for all, Oscar.

This is the code that i use:

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset

Set conn = New ADODB.Connection
conn.CursorLocation = adUseClient
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
& "SERVER=MySERVER;" _
& "DATABASE=MyDatabase;" _
& "UID=user;" _
& "PWD=password;" _
& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 163841
conn.Open

Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "SELECT * FROM anuncios;", conn, adOpenStatic, adLockReadOnly

myrows = rs.RecordCount ' ERROR E_FAIL

If Not rs.EOF Then ' FOUND NOTHING WHEN EXIST RECORDS
With rs
Do While Not .EOF
Debug.Print "ID: " & .Fields("ID")
.MoveNext
Loop
End With
End If

rs.Close
conn.Close

Options: ReplyQuote


Subject
Written By
Posted
TEXT, MEDIUMTEXT type field problems with MyODBC
December 13, 2004 09:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.