Using multiple dataadapters does not work in CF???

  • Thread starter Thread starter Earl
  • Start date Start date
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")
 
Ewwwwww ... wiping the egg off my face here. I'd added the PocketPC table
after finishing the database design but had failed to go back and include it
in the merge publication. Further review in the query analyzer confirmed no
table had been downloaded to the onboard sqlce db.
 
Back
Top