all groups > sql server odbc > january 2004 >
You're in the

sql server odbc

group:

sql parser-table name


sql parser-table name Arrun S
1/10/2004 3:06:05 AM
sql server odbc:
H
I need to get the table name(s) and the column name(s) present in a query before it is executed against the database. Are there any built-in functions (in SQL Server or in C#)? I came to know about "ODBC minimum SQL Grammar" from MSDN. Anyone knows whether it'll serve my problem

TIA
Re: sql parser-table name Brian Lawton
1/11/2004 9:30:05 AM
I don't believe SQL Server provides any built-in functions for capturing
this type of information. It does however provide the SQL Profiler tool
through which you can filter and capture all database activity including the
statements being executed. Profiler run independent of process submitting
the requests so you're trying to intercept database calls before they happen
with the intent of preventing one you don't want, Profiler won't do this.
Through C# and your application's data access layer you could always do some
form of customization that traps the information and since you're in
control, you can decide to let it execute or filter as necessary.

--
--Brian
(Please reply to the newsgroups only.)


[quoted text, click to view]

AddThis Social Bookmark Button