WINE + MSSQL 2000 + VB6 -> Numbers are rounded in recordset
Hi all,
I've got a "straightforward" database querying problem with a Visual Basic 6 application that happens on Debian (+WINE), but not on Windows XP. SETUP: * COMPUTER "FREE" with: --- DEBIAN Lenny (Lang: Spanish) --- unixODBC + FreeTDS for ODBC conectivity to remote MSSQL2000 (tested, working) --- WINE 1.1.33 --- MDAC 2.8 (for channelling the ODBC connection through to unixODBC) * COMPUTER "M$" with: --- Windows XP (Lang: Spanish) --- MSSQL Server 2000 --- MDAC 2.8 PROBLEM: I create an ODBC connection to MSSQL2000 on VB6, and query a field (Numeric 9,2) into an ADODB.Recordset. On Windows, the program returns the complete field numeric value (2.44), but on Debian it rounds the number (2.00). On Debian, channelling the Query through isql properly returns 2.44, so it's most likely a WINE or VB6+WINE issue. LITTLE VB6 TEST PROGRAM CODE (returns 2.44 on Windows XP, but 2.00 on Debian): Code:
Private oConn As ADODB.Connection Any pointers will be most welcome. I am completely...uh... WTFed by this problem. |
that's probably wine bug. try searching in http://bugs.winehq.org/
maybe there's a workaround |
Thanks. I checked all bugs related to SQL in general there and could find nothing related to my problem. I will upgrade to WINE 1.1.35 though and see what happens.
|
Quote:
|
You might also want to consider:
1. Trying some output besides a message box 2. Explicitly casting the value to see if VB6 can read it as a floating point number. For example: Code:
Private Sub Command1_Click() |
Well... I have updated WINE to the latest version and the problem remains.
Quote:
|
In WINE 1.1.35, native OLE DB support was added. Since I could not find a solution using ODBC, I switched to a OLE DB DSN-Less connection taking advantage of this brand new feature and tried again. It worked!
I could not find why ODBC gave me this problem, and now I can remain happily ignorant [hopefully]. :hattip: Thank you all for your suggestions. |
All times are GMT -5. The time now is 08:20 PM. |