Re: After RDA Pull, first insert/update to db crashes app
- From: "Darren Shaffer" <darrenshaffer@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Mar 2006 14:58:24 -0700
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.
.
- Follow-Ups:
- References:
- Re: After RDA Pull, first insert/update to db crashes app
- From: Darren Shaffer
- Re: After RDA Pull, first insert/update to db crashes app
- From: Will
- Re: After RDA Pull, first insert/update to db crashes app
- Prev by Date: Re: After RDA Pull, first insert/update to db crashes app
- Next by Date: Re: DropSubscription Difficulties in SqlCe 2.0
- Previous by thread: Re: After RDA Pull, first insert/update to db crashes app
- Next by thread: Re: After RDA Pull, first insert/update to db crashes app
- Index(es):
Relevant Pages
|