Access database to XML

  • Thread starter Thread starter EMW
  • Start date Start date
E

EMW

Hi

Is it possible to convert a MDB access database to a XML (sheet/something)?
I'm very new with XML, thus I don't know all its possibilities.
I'm writing a program for my PDA and since it is not possible to open the
CDB database with .NETCF, I'm looking for other possibilities then buying
3rd party (inthehand) software.

thanks,
Eric
 
You can grab all of your tables in the Database and put them in a DataSet.
From there you can use DataSet.WriteXML("SomePath") to create an XML file,
and myDataSet.ReadXML("SomePath") to get it into a Dataset

If you look at my post here (mullahbill is my forum name)
http://forums.devbuzz.com/tm.asp?m=24284&p=11&tmode=1&smode=1 I show an
example of how to do this...

Remember though if you are new to PPC, that the filesystem is different...no
C:\ drives or such,

HTH,

Bill
 
Thanks!

William Ryan said:
You can grab all of your tables in the Database and put them in a DataSet.
From there you can use DataSet.WriteXML("SomePath") to create an XML file,
and myDataSet.ReadXML("SomePath") to get it into a Dataset

If you look at my post here (mullahbill is my forum name)
http://forums.devbuzz.com/tm.asp?m=24284&p=11&tmode=1&smode=1 I show an
example of how to do this...

Remember though if you are new to PPC, that the filesystem is different...no
C:\ drives or such,

HTH,

Bill
 
Ok, I read the thread, but I'm now puzzled.
With this methode I first make my query, then put it on the PDA and then
read it?

What I need to do is to create a list of records in which my PDA program
makes a search.
I.e. I work at a mobile communications firm and we have a few thousend sites
all over the country.
Each site has a 4 digit number and the user of my program enters this number
in the textbox.
Then he taps on "search" and he will get the address and some more info.

Right now it is done by a sql-query in a ADOCE connection object, but since
cdb is not supported in .NETCF,
I need some other way to do this.
I figured XML is the easiest???

So can I make an XML file of the database info (created from an EXCEL sheet)
and then make some kind of query inside this XML page?
Can I create a new XML sheet based on the original XML file with the
criteria for the seach?

I hope I'm not too much of a pain in the a.. ;)

rg,
Eric
 
You aren't a pain, no worries...

1) If you are used to standard queries, you cna use a product by Inthehand
that's an ADOCE wrapper. While I have not used it personally, I know many
that have and the reviews are universally that the product is excellent and
the guy that wrote it is very visible and well respected in the CF world.
2) You can also use SQL Server CE which is a great solution. If you search
on SQL Server CE there are a few good example out there, but Rob Tiffany
just came out with a new book on the subject...I just wrote a review on it
here http://www.devbuzz.com/content/books.asp and it's available at a 30%
discount.

3) If you want to use XML here's a basic strategy. The whole goal is to use
Data in a DataSet and the dataset doesn't care where it comes from (the
data). It can come from SQL Server, CE, a text file, an XML file etc. So,
on the desktop, you fire a query and build a dataset that has all the data
you need. Then, use DataSet.WriteXML("SomePath");

Then, copy via your method of choice the XML file to the PDA.

Once it's there, you declare a new dataset and call the ReadXML ie
myDataSet.ReadXML(@"\Storage Card\myData.xml");

Now that data is available on the PDA. I'd recommend making the dataset a
public property so you can acccess it throughout. you can add all you want
to it and then when you are done, write the new XML back to the storage
card, sync the file back to the desktop and use it to update your database.
It sounds much more complicated than it is.

You can also use the tables of the Dataset to create other objects like
Dataviews to facilitate searching and filtering....

HTH,

Bill
 
Back
Top