RE: Using XML to serialize a SQL Query

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bob (notrainsley_at_worldsavings.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 05:37:06 -0700


"Kevin Yu [MSFT]" wrote:

> Hi Bob,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you need to parse the WHERE clause
> yourself. If there is any misunderstanding, please feel free to let me know.
>

We may be coming at the same thing from different angles. I have an ASP.NET
page that will assist the user in creating the WHERE clause, in a manner
similar to the way it works in DTS when the user is specifying a query to
select the data to be imported/exported.

This expression becomes a rule. I will combine this rule with other rules to
create a SQL query. Each rule is stored in the database and the user can edit
them. When I retrieve the rule from the database, I need some way to populate
the controls on the page with the components of the rule.

Let's take a simple rule: Loan.Amount > 500000

If I simply store it in the database as "Loan.Amount greater than 500000", I
will have to parse the string to populate the the page with the components of
the rule.

My thought was that if I could store the rule in the database is some sort
of pre-parsed form, it would simplify the work I need to do to populate the
page with the components of the rule.

So, if I had some sort of schema that allowed me to store the rule something
like:

<coumnReference>Loan.Amount</columnReference>
<operator>greater than</operator>
<value>500000</value>

it would be easier to populate the page properly.

Does this make sense, or am I trying to use the wrong tool for the job?

Bob



Relevant Pages

  • Re: Parsing and storing formulas
    ... you could easily store different views/stored ... >I was wondering how I can parse a mathematical formula in a storable way. ... > be stored for in the database. ... > The second idea is to represent the formula as a tree. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Text indexing problem.
    ... to make a text indexer, which should parse a text file and store ... the important words and the count of their occurrence in a database. ...
    (comp.programming)
  • Read xml file, store data in db. What could be easier?
    ... I am going to receive an xml doc and am going to have to parse the data ... values and store them in the database. ...
    (microsoft.public.sqlserver.xml)
  • Re: Text indexing problem.
    ... which should parse a text file and store ... the important words and the count of their occurrence in a database. ... foreach my $word ...
    (comp.programming)
  • Re: Tables and inserting rows
    ... endorsements would populate for that 1 vehicle. ... Is it possible to rename the bookmark or do I have to use the other option ... Dim myDataBase As Database ... Dim myActiveRecord As Recordset ...
    (microsoft.public.word.vba.general)