E
Earl
Very odd behavior. I try to fill two dataadapters on the same connection and
I get an exception on the 2nd fill. Code similar to this has never been a
problem in my winforms app, so this must be some limitation of CF?
Dim strSQLServer As New SqlCeConnection(strConn)
Dim cmd As New SqlCeCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select * From Employees"
cmd.Connection = strSQLServer
Dim cmdPPC As New SqlCeCommand
cmdPPC.CommandType = CommandType.Text
cmdPPC.CommandText = "Select * From PocketPCs"
cmdPPC.Connection = strSQLServer
strSQLServer.Open()
Dim da As New SqlCeDataAdapter(cmd)
da.Fill(ds, "dtCanvassers")
Dim da2 As New SqlCeDataAdapter(cmdPPC)
'an exception occurs here
da2.Fill(ds, "dtPocketPCs")
I get an exception on the 2nd fill. Code similar to this has never been a
problem in my winforms app, so this must be some limitation of CF?
Dim strSQLServer As New SqlCeConnection(strConn)
Dim cmd As New SqlCeCommand
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select * From Employees"
cmd.Connection = strSQLServer
Dim cmdPPC As New SqlCeCommand
cmdPPC.CommandType = CommandType.Text
cmdPPC.CommandText = "Select * From PocketPCs"
cmdPPC.Connection = strSQLServer
strSQLServer.Open()
Dim da As New SqlCeDataAdapter(cmd)
da.Fill(ds, "dtCanvassers")
Dim da2 As New SqlCeDataAdapter(cmdPPC)
'an exception occurs here
da2.Fill(ds, "dtPocketPCs")