Bug #32177 VB.NET & MySQL "Multiple-step OLE DB operation generated errors"
Submitted: 8 Nov 2007 4:25 Modified: 8 Dec 2007 5:33
Reporter: Vignesh Mohanasundaram Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S5 (Performance)
Version:MySQL 5.0 OS:Windows (VISTA)
Assigned to: CPU Architecture:Any

[8 Nov 2007 4:25] Vignesh Mohanasundaram
Description:
I'm currently trying with a project in VB.net with MySQL. I use MySQL .net connector and ADODB to access mysql database. It's easier for me to connect and update fields through ADODB. Do u have any special functions to do so. please send me an copy of that.

And in my code at one point of time, "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." this error has been popued up. I'm attaching the cod here with.

Con = new ADODB.Connection(connectionString)
ProRss = New ADODB.Recordset
ProRss.Open("SELECT * FROM Emp_PD WHERE CompID='" & Comp_Id & "' && EmpID = '" & TxtEmpID.Text & "'", Con, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)
If ProRss.EOF Then ProRss.AddNew() : ProRss.Fields("CreatedOn").Value = Format(Today, "yyyy/MM/dd")
ProRss.Fields("CompID").Value = Comp_Id
ProRss.Fields("EmpID").Value = TxtEmpID.Text
If Not TextBox4.Text = "" Then ProRss.Fields(6).Value = TextBox4.Text
ProRss.Fields("EmpDOB").Value = DateBirthPicker.Value
If Not ComboBox1.SelectedIndex = -1 Then ProRss.Fields("Sex").Value = CType(ComboBox1.SelectedItem, Char)
If Not TextBox5.Text = "" Then ProRss.Fields("Religion").Value = TextBox5.Text <- Here the error occurs ->
If Not TextBox12.Text = "" Then ProRss.Fields("EyeR").Value = TextBox12.Text
ProRss.Update()
ProRss.Close()

When it's null string then no problem, otherswise if i'm trying to store a string valuse then error generates.
Please help me in rectifing this error as soon as possible.

Thanking you!
Regards,
Vignesh

How to repeat:
Con = new ADODB.Connection(connectionString)
ProRss = New ADODB.Recordset
ProRss.Open("SELECT * FROM Emp_PD WHERE CompID='" & Comp_Id & "' && EmpID = '" & TxtEmpID.Text & "'", Con, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)
If ProRss.EOF Then ProRss.AddNew() : ProRss.Fields("CreatedOn").Value = Format(Today, "yyyy/MM/dd")
ProRss.Fields("CompID").Value = Comp_Id
ProRss.Fields("EmpID").Value = TxtEmpID.Text
If Not TextBox4.Text = "" Then ProRss.Fields(6).Value = TextBox4.Text
ProRss.Fields("EmpDOB").Value = DateBirthPicker.Value
If Not ComboBox1.SelectedIndex = -1 Then ProRss.Fields("Sex").Value = CType(ComboBox1.SelectedItem, Char)
If Not TextBox5.Text = "" Then ProRss.Fields("Religion").Value = TextBox5.Text <- Here the error occurs ->
If Not TextBox12.Text = "" Then ProRss.Fields("EyeR").Value = TextBox12.Text
ProRss.Update()
ProRss.Close()
[8 Nov 2007 5:33] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact version of Connector/Net used.
[9 Dec 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".