Dataset, XML, T-SQL

F

Franck

Ok here's my question. I have a program which can run both online or
offline.
Online work on a Webservice getting data from SQL2000. When the person
want go offline he have to be online first and few tables are being
saved locally in XML (non sensitive data of course). In offline mode
the program is quite limited in things you can do. In the online
mode(full mode) there is alot of very complex T-SQL. And these have to
be repeated using XML. The problem is that the XML is loaded in a
dataset, but the dataset is pretty limited with what it can filter and
all that i know of

So is it really missing alot of feature to be able to control like t-
sql statement (like,convert,if,max,top,union,...) or they are there ?
if they are, where can i get either Examples or class sources
controling XML with dataset.

Google search haven't been good help so far, but i guess it's either
not existing or i was not using good keywords.

Thanks.
 
A

Alberto Poblacion

Franck said:
Ok here's my question. I have a program which can run both online or
offline.
Online work on a Webservice getting data from SQL2000. When the person
want go offline he have to be online first and few tables are being
saved locally in XML (non sensitive data of course). In offline mode
the program is quite limited in things you can do. In the online
mode(full mode) there is alot of very complex T-SQL. And these have to
be repeated using XML. The problem is that the XML is loaded in a
dataset, but the dataset is pretty limited with what it can filter and
all that i know of

So is it really missing alot of feature to be able to control like t-
sql statement (like,convert,if,max,top,union,...) or they are there ?
if they are, where can i get either Examples or class sources
controling XML with dataset.

Google search haven't been good help so far, but i guess it's either
not existing or i was not using good keywords.

No, the DataSet does not provide that functionality. You are right in
that it only can do very simple selection. It is not intended as a
full-featured database and it can not do complex SQL. If you really need it,
then you will need to install a database on the computers so that it can be
used for querying when they are offline. You could, for instance, use the
Express version of Sql Server (or the Compact Edition), which is free, and
replicate data from the main database into the local SqlExpress (instead of
the xml file). Then you can execute all kinds of complex Sql queries against
your local server.
 
M

Marc Gravell

On that subject, note that .NET 3.5 (looking at beta2, at least)
introduce sync-services and the "Local Database Cache" item-type in
VS2008. This provides inbuilt support for taking an offline snapshot
to a CE database and re-sync when back online.
http://tinyurl.com/2bjbvv

Marc
 
M

Matthias Engels

Alberto said:
No, the DataSet does not provide that functionality. You are right in
that it only can do very simple selection. It is not intended as a
full-featured database and it can not do complex SQL. If you really need
it, then you will need to install a database on the computers so that it
can be used for querying when they are offline. You could, for instance,
use the Express version of Sql Server (or the Compact Edition), which is
free, and replicate data from the main database into the local
SqlExpress (instead of the xml file). Then you can execute all kinds of
complex Sql queries against your local server.

When you work with XML, why don't you use XPath and XSLT for data selection?
If you prefer SQL for data selection, you could also use file based
databases like SQLite or Microsoft Access if you don't want to install
and manage a database server for every offline client.
 
F

Franck

So it seems Client database program is the solution. But here's
another question. The XML files are Encrypted and Decrypted upon
loading/saving. What would be faster. Doing custom code to emulate sql
query on XML or running it on the free SQL express ???
 
S

sloan

Faster?

Sql Express for development time.

Because all the DDL and TSQL you create for the main database...will be the
same for the SqlExpress database.

.......
 

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

Similar Threads


Top