Home All Groups Group Topic Archive Search About
Author
5 Apr 2005 5:55 PM
TS
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"


--
TS

Author
5 Apr 2005 6:05 PM
Ken Tucker [MVP]
Hi,

        Your connection string is wrong

       strConn &= "Data Source = Persist Security Info=true;Integrated
Security=false;User ID=sa;Password=xxx;database=SSC;server=zzz;"


Here is an example
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"

strConn &= "Data Source = C:\Northwind.mdb;"



Ken

-------------------------

"TS" <T*@discussions.microsoft.com> wrote in message
news:CEA16F67-E2B6-4780-9F01-B6BBA9B78EA0@microsoft.com...
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"


--
TS
Author
6 Apr 2005 2:59 PM
TS
Thanks, but I'm getting confused now. The server where the SQL database
resides is USEGNYDC3\CLIENT_DB and the database name is SSC.
I tried the following connection string:
strConn &= "Data Source = \\USEGNYDC3\CLIENT_DB\SSC.mdb;" and got an error
message. What should the connection string be then?


Show quoteHide quote
"Ken Tucker [MVP]" wrote:

> Hi,
>
>         Your connection string is wrong
>
>        strConn &= "Data Source = Persist Security Info=true;Integrated
> Security=false;User ID=sa;Password=xxx;database=SSC;server=zzz;"
>
>
> Here is an example
> strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
>
> strConn &= "Data Source = C:\Northwind.mdb;"
>
>
>
> Ken
>
> -------------------------
>
> "TS" <T*@discussions.microsoft.com> wrote in message
> news:CEA16F67-E2B6-4780-9F01-B6BBA9B78EA0@microsoft.com...
> 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"
>
>
> --
> TS
>
>
>