PC Review


Reply
Thread Tools Rate Thread

Dataset, XML, T-SQL

 
 
Franck
Guest
Posts: n/a
 
      13th Nov 2007
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.

 
Reply With Quote
 
 
 
 
Alberto Poblacion
Guest
Posts: n/a
 
      14th Nov 2007
"Franck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.

 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      14th Nov 2007
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


 
Reply With Quote
 
Matthias Engels
Guest
Posts: n/a
 
      14th Nov 2007
Alberto Poblacion schrieb:
> "Franck" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>


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.
 
Reply With Quote
 
Franck
Guest
Posts: n/a
 
      14th Nov 2007
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 ???

 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      14th Nov 2007
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.

.......





"Franck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 ???
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 06:26 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 7 9th Dec 2003 02:50 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 2 31st Oct 2003 01:05 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.