Databases and SQL

J

John Young

I am writing a basic useful little program for myself. It will use a db
that is stored on the ppc. If I create a database using access, how do i
transfer that to the ppc emulator and make sure it stays there (I don't have
a real ppc at the moment!)?
Also, when accessing the db from the ppc program, do I need to use the
System.Data.SqlClient namespace?
Any information is gratefully accepted. Also any links or tutorials (basic)
using database access on ppc would also be great.

Thanks in advance for any help given.

John Young
 
W

William Ryan

Rob Tiffany's book on SQL Server CE is a great resource but if you are going
to use pocket access, you'll need to use something like the ADOCE wrapper
from InTheHand - it's very good stuff.

If you are going to access a SqlServer database (not a CE install but the
full version) then you need use SqlClient. However, SqlClient won't work
with an Access Database, only Oledb.

HTH,

Bill
 
J

John Young

So, if I use an access mdb and OleDb, then that should work ok? Great, now
how do I make sure that VS will always transfer the mdb to the ppc emulator?
Oh, and if I update the mdb in the emulator, will I be able to transfer the
updated mdb back to my pc? Hmmm, I gotta get me a ppc!

Thanks again...

John
Rob Tiffany's book on SQL Server CE is a great resource but if you are going
to use pocket access, you'll need to use something like the ADOCE wrapper
from InTheHand - it's very good stuff.

If you are going to access a SqlServer database (not a CE install but the
full version) then you need use SqlClient. However, SqlClient won't work
with an Access Database, only Oledb.

HTH,

Bill
 
J

John Young

Hmm, it seems that OleDB is not supported in CF..Is that right? If so, how
can I access a db from my ppc program. I don't really want to have to pay
to be able to do so, as my software is only a small program and only for me.

Thanks

John
 
A

Alex Feinman [MVP]

If you are planning to use a DB stored on the device, your choices are SQL
CE, Pocket Access DB (YOu will also need InTheHand wrapper) and xml file.
There are also several other products on the market.

1) SQL CE. Pros: free for you if you do not need SQL Server synchronization.
Comes with VS2003. Has native support in CF. Supports wide range of SQL
features. Cons: About 2MB of RAM for the engine. Currently no ability to
build the databases on the desktop (There was a post about a commercial tool
that allows to do it)

2) Pocket Access. Pros: Automatic conversion between desktop and PPC
databases on synchronization. Cons: requires 3rd party tool to use from CF
app.

3) Xml file: Pros: Very simple to use from CF. Synchronizes with desktop
automaticaly (no merge of course, just replace). Cons: Quickly slows down
when grows large. No transactional support. No command support.

System.Data.SqlClient namespace is used to access SQL Server 2000 (on the
desktop server) from PPC directly (using IP connectivity)
 
P

Pealy

Just though I'd throw this one in..

I recently moved to .net and was horrified to discover that access is
no longer supported, I'm not changing all my desktop apps just because
microsoft leaves out support for the most commonly used database in
the world.

What I did was write a small application to create the SQLCE database
on the PPC using calls to an application on the PC. This app feeds the
structure and then the data to produce a perfect copy of the PC's
access DB.

Certainly took less time (and money) than migrating all the desktop
apps to SLQ Server.

N.
 
J

John Young

Hmm, looks like XML is going to be the best way to go. The data I need to
store will not grow beyond 60k or so (I think). Anyone know of any *good*
tutorials on using XML with the ppc? Looks like I've got to learn it
then...

Thanks

John
 
J

John Young

Also, another question. Does Pocket Access come installed on the ppc 2002
emulator? I can't seem to find it, or is it with the 2003 emulator?

Thanks again.

John
 
A

Alex Feinman [MVP]

When I said XML, I meant persisting DataSet object as XML. DataSet has
methods ReadXml and WriteXml that take care of persistence. The database
opeartions are going to be performed on the DataTable and DataView objects -
you are not going to have to parse xml per se
 
G

Ginny Caughey [MVP]

John,

Be sure to test DataSet.ReadXml / DataSet.WriteXml with production sized
loads. XML is the slowest approach. For a faster approach to working with
datasets and text files, check out the CSV class on www.opennetcf.org.
 

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