SQL Server CE Database : Pda to desktop and back

V

Victor

Is there anyway to create an SQL Server CE
Database on the pc desktop,
and also a way of taking the SQL Server CE Database from the
pda to the desktop
using a method other than replication??
 
M

Mark Reddick

You cannot create a CE database on the desktop. You can use RDA (Remote Data
Access) to keep a desktop SQL Server db in sync with a CE db. That is what
I'm doing. Here is what I did for my app:

1) Create the database I want on desktop SQL Server. Remember not to use
stored procs or views as they are not supported on SQLCE.

2) Add any initial data I want into the desktop SQL Server database.

3) In my PPC app, I then use SQLCE and do a CreateDatabase to create a
database on the PPC device.

4) I then use RDA and connect to my desktop database and pull all the tables
down to my SQLCE database.

5) I then reset my identity columns as they don't come down with RDA.

That's it. The app can then use the SQLCE database. You can then use RDA
again to push any changes made on the SQLCE db to your desktop DB. I do this
so that my desktop database remains my "master" db.

HTH,
Mark
 
L

LawX

so,

I'm interested in what you're saying about stored
procedures on the desktop DB. Is it really impossible to
use stored proc on the server even if my SqlCe doesn't try
to use them. I mean, when doing the RDA, where is the prob
with stored proc if RDA only copy tables to the SqlCe.

I'm quite a beginner in developping C# for mobile but I
have a huge solution to make before soon. My databses on
the server are already created and use stored procs. You
make me nervous by telling me it won't work !! ;-)

thanks for explaining me in details how all that work.
bye
 
M

Mark Reddick

No no. Sorry to confuse you. You can use sp and views on the desktop
database. You just can't use them on the CE database (on the PDA). So, your
PDA app has to be able to work without relying on stored procs or views.
 
L

LawX

Great thanks for all that. I didn't ask for so much
examples but it's pleasant to feel helped.
Really thank you, RDA and SQL CE have never been so clear
to me.
LawX
 
J

John Atkins

Could I jump in and ask a question about RDA? I've not used it yet but when
I read about it, I thought it was only for the desktop PC end. In other
words, I thought the PC had to make the connection to the PPC and then send
to or request data from the PPC.

Could you confirm that the PPC can also make the connection and be in
control?

Regards

John.
 
L

LawX

As far as I know, only the PPC could use RDA. The device
has to be connected to the Internet and the server could
not know if it is or not. So, in my view, RDA is a way to
call synchronisation, but only the PPC can launch the
service.
Actually, I'm beginner in using C# and mobile devices. I'm
desesperatly trying to connect both PPC and Desktop and
that's not so easy. There are many parameters that come in
the process and, as i don't konw much about MS
environnement, it's hard for me to understand all.
But anyway, many people have been able to use RDA, I'm
sure it works perfectly, it just need a bit of practicing.
If anyone knows any good documentation about all that
stuff, i'll be pleased to be awared.

thanks.
 
J

John Atkins

Apologies to you and Mark. I was confusing RAPI with RDA. I thing RAPI can
only be controlled from a PC not a PPC but I could be wrong. RDA is complely
different.



Incidentally a book I can recommend is Microsoft .NET Compact Framework Core
Reference by Wigley and Wheelwright. It does contain a section on RDA.



Try saying Wigley Wheelwright a few times fast! :)



John.
 

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