| Bug #30349 | MyODBC 3/ADO Unable to update records that contain bit data type-regression | ||
|---|---|---|---|
| Submitted: | 10 Aug 2007 8:36 | Modified: | 5 Mar 2008 10:53 |
| Reporter: | Eric MaLossi | ||
| Status: | In progress | ||
| Category: | Connector/ODBC | Severity: | S2 (Serious) |
| Version: | 3.51.18 | OS: | Microsoft Windows (Windows XP SP2) |
| Assigned to: | Lawrin Novitsky | Target Version: | 3.51+ |
| Tags: | ADO BIT | ||
[10 Aug 2007 8:40]
Eric MaLossi
Forgot to mention, although the error seems to indicate that the data was simply truncated, the update never occurs, and there is no statement in the General Log to indicate an attempt
[14 Aug 2007 9:45]
Susanne Ebrecht
Hi Eric, thank you for writing a bug report. Please test, if the error still occur in 3.51.19. Regards, Susanne
[5 Jan 2008 23:21]
Eric MaLossi
Retested against 3.51.22 and 5.1.1 - Result for both drivers was identical. The error received now is different but still occurs on the update statement "Trace: 3219::Operation is not allowed in this context." TestCase added to the ADO conformance tests \ado_conformance\trunk\tests\bugs\30349.vbs
[28 Mar 2008 10:09]
Tonci Grgin
Bug#35615 has been marked as duplicate of this one.

Description: This bug was introduced in .18. This test will work in versions previous The following error is thrown when the update method is called. -2147467259:[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt-log]Truncated incorrect DOUBLE value: '' The same error is thrown for any BIT(n) column where n>=1 The test only fails when the adUseServer cursor is used, adUseClient works. How to repeat: Setup: CREATE TABLE bittest (C1 INT PRIMARY KEY, C2 CHAR(10), C3 BIT(2)); INSERT INTO bittest VALUES (1,'FOO',1),(2,'BAR',2); VB Code: Private Sub bittest() On Error GoTo EH Dim strSQL, strConn As String Dim connection1 As adodb.Connection Dim recset1 As adodb.Recordset Dim fld As Field Set connection1 = New adodb.Connection Set recset1 = New adodb.Recordset strSQL = "SELECT * FROM bittest" strConn = "DRIVER={MySQL ODBC 3.51 Driver};" & _ "SERVER=localhost;DATABASE=ado" & _ ";USER=root;PASSWORD=mypass;OPTION=3;" ' open connection connection1.ConnectionString = strConn connection1.CursorLocation = adUseServer connection1.Open ' open recordset recset1.Open strSQL, connection1, adOpenForwardOnly, _ adLockOptimistic, adCmdText While Not recset1.EOF For Each fld In recset1.Fields If fld.Type = adChar Then fld.Value = "test" recset1.Update End If Next recset1.MoveNext Wend recset1.Close Set recset1 = Nothing connection1.Close Set connection1 = Nothing Exit Sub EH: Debug.Print Err.Number & ":" & Err.Description recset1.Close Set recset1 = Nothing connection1.Close Set connection1 = Nothing End Sub