Run-time error -2147217887 (VB6) when reading DECIMAL column from mySQL 5.0.4

Run-time error -2147217887 (VB6) when reading DECIMAL column from mySQL 5.0.4

am 27.04.2005 15:10:22 von lascjr

Hi,

When reading DECIMAL (with 12,2) column from mySQL 5.0.4 i receiving this
message error:

Run-Time error -2147217887 (80040e21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

I use Microsoft Visual Basic 6 SP6 with myODBC 3.51.11-1.

The read and write is fine with the VARCHAR, TEXT and others data types.

I tested and the problem with DECIMAL does not occur with the mySQL 4.0.24.

I use this connection string:
Driver={MySQL ODBC 3.51 Driver};Server=xxx.xxx.xxx.xxx;
Port=3306;Database=xxxxxx;UID=xxxx;PWD=xxxx;Option=16427;

How to repeat:
Read any column of data type DECIMAL (12,2 in this case, i not tested with
othes)

Example of Visual Basic 6 code:

Dim conn As New ADODB.Connection
Dim strConn As String

strConn = "Driver={MySQL ODBC 3.51
Driver};Server=localhost;Port=3306;Database=xxxx;UID=xxxx;PW D=xxxx;Option=16
427"

conn.Open strConn

Dim SQLDB As New ADODB.Recordset
Dim StrDB As String

StrDB = "select name,points from tablename where id=10"
SQLDB.Open StrDB, conn

If Not (SQLDB.BOF And SQLDB.EOF) Then
txtname.text = SQLDB("name") 'fine at this point, name is CHAR
txtpoints.text = SQLDB("points") 'error at this line, points is DECIMAL
end if

SQLDB.close
set SQLDB=nothing

conn.close
set conn=nothing


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org