473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Query Parser for Dataset??


Is there any sort of query engine for use with .NET datasets? I have
an application that has a very small disconnected client database - 2
dozen tables, largest table @100 rows. If loaded into a dataset and
then saved to disk the absolute worst case file wouldn't even be 10
meg...

However, to present data to the user, the application would need to
issue a very complicated select statement; inner & outer joining most
of the tables, nested selects on most of the other tables, several
levels of grouping and aggregation.

Is there any way to do this without using an underlying database?

Mar 8 '06 #1
5 3755
Well usually I would do this with stored procedures and views, but as
you mentioned you need to do it in the dataset.
Datatables have a few filtering mechanisms, but I don't think you will
be getting the kind of power you need out of them.
You really need to be specifying what data you want to select before it
gets to the dataset.
You can of course construct your sql statement in your C#, and then
send it via a data-adapter, and fill your dataset that way.
Just change the SelectCommand's command text to your sql statement. You
won't be able to do updates though.

If you have already considered all of these, I am not sure what else
there is to help.

Mar 8 '06 #2

We can use SQL Server express if we must... But I'd rather not set up
merge replication and all of that stuff if there is an easier way.

The application would be mind boggling simple if I could fetch a
dataset from the server - say through a web service - modify it
disconnected, and then pass the dataset back to the server via the web
service. Then the server could issue the Dataset.Update call to put
the data into SQL Server...

The only catch is that I need to present the data to the user in a grid
that is filled by a very complicated query...

Mar 9 '06 #3
So why can't you have your webservice simply accept an SQL string as a
parameter, and still return a dataset?
Then you can bind the dataset to the grid. You can create your complex
call in the SQL that gets passed.

This way you can have dynamic content in your grid at run time.

Naturally you'd want some sort of authentication on that kind of a web
method since it could potentially be used maliciously.

Mar 9 '06 #4
When I said disconnected I wasn't kidding... :)

Use case: A nurse connects to a network via cellular modem & vpn login
{painfully slow to establish connection}, downloads his/her caseload to
a tablet PC, disconnects. Then nurse drives all over town visiting
patients in their households and updating data. Nurse can add new
households and new patients while disconnected. Supervisors can edit
caseload and patient data on server side while nurse is disconnected.
Tablet can be turned on/off and application may be entered/exited at
will. Every other day or so nurse reconnects to network and
synchronizes with server...

The dataset is very small; one nurse's caseload - largest conceivable
real world caseload is @50 households containig @70 patients. The
dataset consists primarily of hierarchical household to patient and
mother to child relationships; most of the rest of the dataset is
enumeration lookup tables and some 1-many relationships; aka
inner/outer joins and nested selects when we do the complicated query.
In order to be HIPPA compliant we would naturally encrypt the dataset
if we saved it to the tablet or while it was being sent to/from server,
and of course the web service would be secure too...

The gotcha is a couple of things that need to have a realtime query
parser available while disconnected:

- The opening screen issues the complicated query to present the nurse
with his/her caseload. If nurse adds a new household and/or patient
they need to appear in the correct spot.
- Nurses can dynamically configure main grid to be "household centric"
or "patient centric" etc..
- Nurses need a rudimentary form of adhoc query capability to find
patients by bizarre combinations of demographics or medical conditions

The dataset approach might not work - I'm just pondering options
aloud... As a nurse can add a new patient while disconnected and a
supervisor can also change the caseload on the server while
disconnected this application might really need merge replication...
It just seems like I'm squirrel hunting with an elephant gun to
configure and administer 100+ tablets with SQL Server and merge
replication for a 70 row grid...

Mar 9 '06 #5
Sure.

I don't think you want to be putting MSDE on every tablet.
You can cache the dataset serialised and encoded to the local disk.
Essentially have this serialised dataset as a pretend local database,
peforming all your queries in your code;
keep copies fo the enum tables in the cache as well. I guess you still
have to figure out how to create complex queries against your dataset.
And that's the part I'm not sure on beyond the basic filters for the
dataview.

Otherwise your logic sounds good to me. Perhaps you need to just to
coded lookups for all the nested relationships against each table as
they are requested.

Mar 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
5
by: Kenneth P | last post by:
Hi, I get a Parser Error message when I try to start my asp.net app. Parser Error Message: Could not load type 'DiskoWeb.dLogin'. I have a code behind file and it's class name is dLogin. ...
4
by: Derek Van Cuyk | last post by:
Hi everyone! I'm trying to write a web application in school that utilizes a MS Access database. I can read and everything fine from it but when I try to add a new record I get an exception that...
1
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
8
by: Jim in Arizona | last post by:
I've been using an example out of a book to be able to edit the rows in a database. I am getting the following error: ========================================================...
3
by: filip.norrgard | last post by:
Hi All! I've been developing an ASP.Net 2.0 web application using the Visual Studio 2005 tools. Currently datagrids on a page are filled with data from a dataset (a .xsd file in the "project")...
2
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
How can I run this query against a table in my Access database? I don't know hwo to use it in C#. In VB I would use .Recordset = "some sql statement". How do I do this in C#? //I get a vlaue...
6
by: Bobby Edward | last post by:
Using ASP.NET 3.5 and MySQL (thru DevArt MyDirect.NET)... On the production server I get a "Parser Error" for every XSD dataset. It works perfect on my dev machine. But, on the production...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.