G
Guest
I configured a data adapter and generated a dataset to access data
coming from an SQL database table when my form loads. After the form loads
nothing is populated in the combo box that supposed to be bound to a column
in the database table. Someone in this newsgroup thankfully told that I still
have to write some codes to populate the combo box with data. Here is the
code he sent me and that I tried on my application. The codes return the
following error message: "Unhandled Exception:
System.Data.OleDb.OleDbException: Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was done". Can
someone please tell me how to make this code work?
Dim strConn As String
Dim strSQL As String
Dim SscIntake1 As New DataSet()
Dim da As OleDb.OleDbDataAdapter
Dim conn As OleDb.OleDbConnection
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
strConn &= "Data Source = Persist Security Info=true;Integrated
Security=false;User ID=sa;Password=xxx;database=SSC;server=zzz;"
conn = New OleDb.OleDbConnection(strConn)
da = New OleDb.OleDbDataAdapter("Select * From qmf_cint", conn)
da.Fill(SscIntake1, "qmf_cint")
ComboBox1.DataSource = SscIntake1.Tables("qmf_cint")
ComboBox1.DisplayMember = "Last_Name"
coming from an SQL database table when my form loads. After the form loads
nothing is populated in the combo box that supposed to be bound to a column
in the database table. Someone in this newsgroup thankfully told that I still
have to write some codes to populate the combo box with data. Here is the
code he sent me and that I tried on my application. The codes return the
following error message: "Unhandled Exception:
System.Data.OleDb.OleDbException: Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was done". Can
someone please tell me how to make this code work?
Dim strConn As String
Dim strSQL As String
Dim SscIntake1 As New DataSet()
Dim da As OleDb.OleDbDataAdapter
Dim conn As OleDb.OleDbConnection
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
strConn &= "Data Source = Persist Security Info=true;Integrated
Security=false;User ID=sa;Password=xxx;database=SSC;server=zzz;"
conn = New OleDb.OleDbConnection(strConn)
da = New OleDb.OleDbDataAdapter("Select * From qmf_cint", conn)
da.Fill(SscIntake1, "qmf_cint")
ComboBox1.DataSource = SscIntake1.Tables("qmf_cint")
ComboBox1.DisplayMember = "Last_Name"