error when using SQL Server CE RDA Pull method

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to develop a pocket PC application using VS.NET 2003(VB
project), SQL Server CE and SQL Server 2000.
I am trying to pull a table from sql server 2000 to my pocket pc using RDA.
but i am getting an error saying SQL Server CE encountered a problem in
opening SQL server ce database. (Native error code: 28559) I couldnt able to
fix that problem. Can anyone help me out. Here is the code that iam using.
 
I have solved the problem.
I added an extra conn.close() before i use the pull function.

Now there are 1 conn.open() and 2 conn.close().
Anyway, how to explain this?
 
The RDA needs to access the SQL CE database. Usually before calling the RDA pull functions if the CE connection is open, RDA would give the error you faced since the RDA cannot access the CE as the connection is already openned by another function.

What i usually do is.

cn.open() before the function

cn.close() right before calling the pull functions

and

in your Finally statement
If cn.State <> ConnectionState.Closed Then
cn.Close()
something like that
 
Thank you for your replying
But what i confused is i have double checked that i have closeed all the
connection before calling the pull function.
 
Back
Top