Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-15 : 09:35:00
|
| Chris writes "I would like to produce some (ASP) code that will parse or validate a user generated SQL (SELECT) statement prior to passing it into ADODB objects to return a recordset back to the user.I can run the code either client side as JavaScript or server side as VBScript/JavaScript." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-05-15 : 10:57:28
|
| It's not something that you can do in ASP, and ADO doesn't have a Parse method. I think you'll have to execute the SQL, and if you get no errors, then you know it parsed successfully. Anyway, IMHO it makes no sense to call the server to parse a statement, find out it's OK, and then call it AGAIN to execute it. |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-05-15 : 13:14:32
|
| I agree with rob whole-heartedly, except you may be able to set parseonly on for the batch to prevent the over-head of actually doing the execution . .<O> |
 |
|
|
|
|
|