Using multiple dataadapters does not work in CF???

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")
 
E

Earl

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top