Re: After RDA Pull, first insert/update to db crashes app

Tech-Archive recommends: Fix windows errors by optimizing your registry



Will,

There are some limitations to RDA Pull when pulling from a view versus a
physical table. I seem to remember that the view could not contain FKs
to other view articles and there were also some other gotchas with this
approach.

Try using google advanced groups search on this newsgroup as follows
for more info:
http://groups.google.com/groups?as_q=rda+pull+view&num=20&scoring=r&hl=en&as_epq=&as_oq=&as_eq=&as_ugroup=microsoft.public.sqlserver.ce&as_usubject=&as_uauthors=&lr=&as_drrb=q&as_qdr=&as_mind=1&as_minm=1&as_miny=1981&as_maxd=20&as_maxm=3&as_maxy=2006&safe=off

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com


"Will" <Will@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4BD01D8E-09F2-4EEF-977A-B6371B585C6B@xxxxxxxxxxxxxxxx
Here is the RDA code (I'm not using the using statement because i have
multiple methods that use the GetRDA method):


protected SqlCeRemoteDataAccess GetRDA()
{
rda = new SqlCeRemoteDataAccess();
rda.LocalConnectionString =
Current.DatabaseHelper.ConnectionString;
rda.InternetUrl = internetUrl;
rda.InternetLogin = internetLogin;
rda.InternetPassword = internetPassword;
return rda;
}

public void LoadBasicApp(ProgressBar bar, Label status)
{
UpdateProgress(bar, 0, status, "Checking Connection to
Server...");

if (CheckConnection.check(internetUrl) == false)
{
MessageBox.Show(CheckConnection.NOT_CONNECTED_MESSAGE);
return;
}

try
{
GetRDA();

UpdateProgress(bar, 5, status, "Cleaning up Database...");

Current.DatabaseHelper.DropTables(new string[] { "company",
"users", "user_roles" });

UpdateProgress(bar, 25, status, "Loading Company
Information...");
rda.Pull("company", "SELECT * from vw_mm_company",
remoteConnectionString);

UpdateProgress(bar, 50, status, "Loading Users...");
rda.Pull("users", "select * from vw_mm_users",
remoteConnectionString);

UpdateProgress(bar, 75, status, "Loading User Roles...");
rda.Pull("user_roles", "select * from vw_mm_user_roles",
remoteConnectionString);

UpdateProgress(bar, 100, status, "Done.");

OnSynchronizationFinished(EventArgs.Empty);
}
finally
{
try
{
rda.Dispose();
}
catch (Exception ex)
{
ErrorHandler.HandleException(ex);
}

rda = null;
GC.Collect();
}

//Calls shring on SqlCeEngine class
Current.DatabaseHelper.CompactDatabase();
}

I'll post table schema in a few minutes.

"Darren Shaffer" wrote:

would need to see your RDA code and the table schema (including indexes
and
constraints) to help with your issue.

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com


"Will" <Will@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FBBE4000-62DF-45A6-B916-950EFBD5D772@xxxxxxxxxxxxxxxx
Hello,

After a RDA Pull, I am having a problem where my application crashes on
the
first update/insert to the local sql ce mobile database. If I don't do
an
RDA
Pull, the application works fine.

I am making sure to call Dispose on the SqlCeRemoteDataAccess object.

I'm using .NET CF 2.0 running on Pocket PC 2003.

Try/Catch doesn't catch any exceptions so I'm not sure where to start
debugging this or implementing a fix. Any ideas?

thanks.





.



Relevant Pages

  • Re: After RDA Pull, first insert/update to db crashes app
    ... with RDA: ... UpdateProgress(bar, 25, status, "Loading Company ... remoteConnectionString); ... I'm using .NET CF 2.0 running on Pocket PC 2003. ...
    (microsoft.public.sqlserver.ce)
  • Speeding up the RDA Push and Pull
    ... RDA Pull and Push to sync the data between the PPC and the Central Server.We ...
    (microsoft.public.sqlserver.ce)
  • Re: After RDA Pull, first insert/update to db crashes app
    ... "Darren Shaffer" wrote: ... rda = new SqlCeRemoteDataAccess; ... remoteConnectionString); ... After a RDA Pull, I am having a problem where my application crashes on ...
    (microsoft.public.sqlserver.ce)
  • Re: mixing merge replication with RDA
    ... no, not necessarily in separate databases, but make sure any tables ... or subsets of tables you are going to RDA pull with tracking on have ...
    (microsoft.public.sqlserver.ce)
  • RE: RDA success but no data through
    ... means of running sql statements at the server. ... To get data down to the device you need to do an RDA Pull operation. ... table you would do and RDA pull with the query "select * from foo;". ...
    (microsoft.public.sqlserver.ce)