Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
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

2005-04-27       - By lascjr@(protected)

 Back
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;PWD=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=mysql@(protected)


Earn $52 per hosting referral at Lunarpages.