473,322 Members | 1,345 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,322 software developers and data experts.

validate sql syntax

How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is changed in the database, but i'm working with other
statements as well, and need to just verify that the syntax of the string is correct, and determine if it is a select, update,
insert or delete statement.

I've looked but can't seem to find a class that does this.


Nov 18 '05 #1
6 4320
do you use a single method for all types of query?

"Jarod_24" <ja******@hotmail.com> wrote in message
news:97******************************@news.teranew s.com...
How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is changed in the database, but i'm working with other statements as well, and need to just verify that the syntax of the string is correct, and determine if it is a select, update, insert or delete statement.

I've looked but can't seem to find a class that does this.

Nov 18 '05 #2
do you use a single method for all types of query?

"Jarod_24" <ja******@hotmail.com> wrote in message
news:97******************************@news.teranew s.com...
How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is changed in the database, but i'm working with other statements as well, and need to just verify that the syntax of the string is correct, and determine if it is a select, update, insert or delete statement.

I've looked but can't seem to find a class that does this.

Nov 18 '05 #3

"Sharon" <ta*******@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
do you use a single method for all types of query?

?!?!
I am asking if there exists a method to do this.


"Jarod_24" <ja******@hotmail.com> wrote in message
news:97******************************@news.teranew s.com...
How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is

changed in the database, but i'm working with other
statements as well, and need to just verify that the syntax of the string

is correct, and determine if it is a select, update,
insert or delete statement.

I've looked but can't seem to find a class that does this.


Nov 18 '05 #4

"Sharon" <ta*******@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
do you use a single method for all types of query?

?!?!
I am asking if there exists a method to do this.


"Jarod_24" <ja******@hotmail.com> wrote in message
news:97******************************@news.teranew s.com...
How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is

changed in the database, but i'm working with other
statements as well, and need to just verify that the syntax of the string

is correct, and determine if it is a select, update,
insert or delete statement.

I've looked but can't seem to find a class that does this.


Nov 18 '05 #5
it is not clear from what you wrote, whether you are using
a single method for all types of data access,
or that you are trying to validate a query for a specific type of data
access
in a specific method.
usually different methods are used for different types of data access.
you don't even have to implement it.
check out Data Access Application Block for .NET:
http://msdn.microsoft.com/library/de...ml/daab-rm.asp
"Jarod_24" <ja******@hotmail.com> wrote in message
news:62******************************@news.teranew s.com...

"Sharon" <ta*******@hotmail.com> wrote in message

news:%2****************@TK2MSFTNGP11.phx.gbl...
do you use a single method for all types of query?

?!?!
I am asking if there exists a method to do this.


"Jarod_24" <ja******@hotmail.com> wrote in message
news:97******************************@news.teranew s.com...
How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is

changed in the database, but i'm working with other
statements as well, and need to just verify that the syntax of the
string is correct, and determine if it is a select, update,
insert or delete statement.

I've looked but can't seem to find a class that does this.



Nov 18 '05 #6
it is not clear from what you wrote, whether you are using
a single method for all types of data access,
or that you are trying to validate a query for a specific type of data
access
in a specific method.
usually different methods are used for different types of data access.
you don't even have to implement it.
check out Data Access Application Block for .NET:
http://msdn.microsoft.com/library/de...ml/daab-rm.asp
"Jarod_24" <ja******@hotmail.com> wrote in message
news:62******************************@news.teranew s.com...

"Sharon" <ta*******@hotmail.com> wrote in message

news:%2****************@TK2MSFTNGP11.phx.gbl...
do you use a single method for all types of query?

?!?!
I am asking if there exists a method to do this.


"Jarod_24" <ja******@hotmail.com> wrote in message
news:97******************************@news.teranew s.com...
How do i check if a sql-string has corect syntax.

With select-statements you can just use a Datareader, since no data is

changed in the database, but i'm working with other
statements as well, and need to just verify that the syntax of the
string is correct, and determine if it is a select, update,
insert or delete statement.

I've looked but can't seem to find a class that does this.



Nov 18 '05 #7

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

Similar topics

2
by: Phil Powell | last post by:
I am not sure why this is producing a SQL Server related error, but w/o having an instance of SQL Server on my machine to verify anything further, can you all help me with this? <!--- validate()...
25
by: bearophileHUGS | last post by:
This post comes from a boring morning, if you are busy ignore this. This post is only for relaxed people. I've found this page, "Syntax Across Languages", it contains many errors and omissions,...
5
by: WF | last post by:
Hello, I don't know if it is the right place for my question but I would like to know if ther's a way to validate a SQL request before sending it to the database. I was thinking abut using Regular...
3
by: Jarod_24 | last post by:
How do i check if a sql-string has corect syntax. With select-statements you can just use a Datareader, since no data is changed in the database, but i'm working with other statements as well,...
3
by: ciaran.mchale | last post by:
Hi folks, I downloaded the binary version of Xerces C++ 2.7.0 for Windows and am using it to help me get up to speed with XML and XML Schema. So please excuse me if this is a "novice" question....
1
by: Gaetan | last post by:
I have a web application where the user can type the name of a file name in a field. I want to make sure the syntax of that filename is valid before using it. I browsed the methods in various...
1
by: FightClubDiego | last post by:
Hey.. I've been working on these sign up / log in forms for my new Game Site, and everything else in the game works but the registration!! I keep ketting the unexpected $end and Im tired of it! Here...
37
by: miken32 | last post by:
In PHP, if a function returns an array it's fairly common to capture its return values like this: <?php list($foo, $bar, $baz) = some_function_that_return_an_array(); ?> In Javascript, would...
5
by: Adam Pelling | last post by:
I'm getting this error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/neblncbt/public_html/forum/includes/acp/acp_board.php on line 69 Here is the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.