Using XML and ADO.Net for Database creation with the Compact Framework

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hey all

Appologies for cross posting, but this post covers a few areas in one.

I'm fairly new to XML and my ideas are over reaching my grasp (as well
as possibly not fully understanding certain concepts). My basic
questions are:

1.
I want to create a database in SQLCE. I understand that a schema is used
for validation purposes (I think) but if a schema was created describing
a database table, could it be loaded with ADO.net and used to create
the table in SQLCE (all this, of course, occurring on a PDA)? At this
point, there would be no requirement for data.
Or would it be better to use a CREATE TABLE script and simply run it as
a query?

2.
The table would be of a generic design so that, for example, a total of
20 fields would exist but depending on user requirement not all of them
would be used. Would this kind of design then limit the effectiveness
of using XML files for data input/output?


Any input would be apprieciated.



Paul
 
You can defintely script the tables and run them, altough I'm not sure of
the efficiency of that approach. Depends on how often you need to do this
in your app and if you persist the data or not.

I Regularly use XML to transfer data between a PDA and both SQL Server and
ORacle. There are many different approaches, but you can easily create a
DataSet, and use it's WriteXML method to write out an XML file. THen, you
can transfer raw XML to a PDA , declare a DataSet and then use the ReadXML
to recreate the DataSEt locally. You can use add new rows , delete them or
whatever else.

Here's an example I answered that may be of some help to you ...
http://forums.devbuzz.com/tm.asp?m=24284&appid=&p=&mpage=1&key=&tmode=&smode=&s=#25126

HTH,

Bill
 
Back
Top