Bug #3760 | Wrong VarChar field reading with VB6 using ODBC v. 3.51.07. | ||
---|---|---|---|
Submitted: | 14 May 2004 11:58 | Modified: | 13 Jun 2013 13:25 |
Reporter: | Andrea Canova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51.07 | OS: | Windows (Windows Xp Professional) |
Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
[14 May 2004 11:58]
Andrea Canova
[15 May 2004 4:11]
Peter Harvey
I have created a test case which seems to show the problem indicated by User. This is, in deed, a bug. Fix being worked out.
[15 May 2004 19:09]
Peter Harvey
ADO is requesting the column data as BINARY. This is a result of the column being defined with the BINARY option. Its not clear to me why the column needs to have the BINARY option so I suggest defining the column without the BINARY option. This solves the problem in my testing. Having said this; there is something in the driver which probably needs to be fixed here - I just hope that leaving BINARY option off can be something you can do to correct the problem right now. If so then; we can leave this as a bug but downgrade the priority.
[15 May 2004 19:15]
Peter Harvey
VB 6 test
Attachment: BUG-3760.tar.gz (application/x-gzip, text), 3.76 KiB.
[8 Oct 2007 17:17]
Susanne Ebrecht
Could you please try the latest released version 3.51.20. Thanks in advance.
[9 Nov 2007 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[25 Oct 2008 8:42]
Iresh Patel
Yes, i am facing same problem now. using vb6 / mysql 5 odbc driver 3.51.24.00 and 5.01.05.00 Table CREATE TABLE `testdata`.`transfer` ( `Book` char(2) NOT NULL, `Vrno` char(6) NOT NULL, `Srno` smallint(6) NOT NULL, `ITEMCODE` char(12) NOT NULL, `QTY` smallint(6) NOT NULL, PRIMARY KEY (`Book`,`Vrno`,`Srno`), KEY `Index_transfer_itemcode` (`ITEMCODE`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='InnoDB free: 11264 kB'; VB6 Code Private ConnWrite As New ADODB.Connection Private rsTemp As New ADODB.Recordset ConnWrite.Open connstr ConnWrite.BeginTrans Public Const connstr = "Provider=MSDASQL;" + _ "DRIVER={MySQL ODBC 5.1 driver};" + _ "Server=wserver;UID=root;PWD=admin;" + _ "database=testdata;option=16387;" Dim cmdado As New ADODB.Command cmdado.ActiveConnection = ConnWrite cmdado.CommandType = adCmdText If StatusBarTransfer.Panels("Mode").text = "Add Mode" Then Set rsTemp = ConnWrite.Execute("select lpad(ifnull(max(vrno),0) +1,6,' ') vrno from transfer where book = '" & mBook & "'") mvrno = rsTemp("vrno").Value cmdado.CommandText = "insert into mymsg select lpad(ifnull(max(vrno),0)+1,6,' ') vrno from transfer where book = '" & mBook & "'" cmdado.Execute rsTemp.Close Set rsTemp = Nothing End If ***** Now here when i am checking mymsg table it is giving me correct value but when i am checking value of mvrno it is giving me like '††?'
[31 May 2013 7:58]
Bogdan Degtyariov
This bug needs to be re-checked
[13 Jun 2013 13:25]
Bogdan Degtyariov
No problem found. Even if the bug existed it must have been fixed in the later versions of Connector/ODBC. Closing the report.