谁能利用/WINNT/System32/SQLPARSE.DLL中的ParseSQLSyntax函数,给个delphi实例,送上200分(200分)

  • 主题发起人 blackhand
  • 开始时间
B

blackhand

Unregistered / Unconfirmed
GUEST, unregistred user!
我想利用/WINNT/System32/SQLPARSE.DLL中的ParseSQLSyntax函数解析SQL语句,可水平有限,
参考资料太少,我已将Microsoft SQL Parser Object Library 1.0引入,但无法让它和数据库
关联上,谁能给个利用/WINNT/System32/SQLPARSE.DLL中的ParseSQLSyntax函数的实例,我表示
衷心感谢,送上200分。
 
我在网上发现一篇文章:
http://www.pinnaclepublishing.com/sq/SQMag.nsf/0/9EE2D29B4CD6750785256957006675C7?opendocument

TIP OF THE WEEK: The Mystery of SQLPARSE.DLL
Last week, I received a question from a reader who was trying to find a tool that would parse a SQL statement into columns and tables in order to determine column and table utilization. He said he'd come across a promising object called the "Microsoft SQL Parser Object Library 1.0" (SQLParse.dll), which exposed one method, ParseSQLSyntax. ParseSQLSyntax returns a tagged string of the SQL statement, but the problem is that the tags in the string don't seem to be unique for the various parts of a SQL statement (i.e. Select, From, Where, and so forth). He couldn't locate any documentation about the object and asked me if I was familiar with it. I was stumped, too, so I forwarded the question to Microsoft's Gert Drapers, who replied that SQLParse.DLL was part of Visual Studio:
Class vbSQLParser
Member of MSSQLParser
Microsoft VB SQL Parser Object 1.0 ++ Internal Use Only ++
and that it was an internal object. Mystery solved.
 
ParseRequest Method
Parses an English question or request into a collection of database queries or other response types for the attached model.

Applies ToSession Object

Syntax
Set Response = Session.ParseRequest(Request)

Parts
Response

A Response object that represents the end user's responses.

Response object Description
CommandResponse An ordered sequence of database queries that is executed to answer the end user's question.
UserClarifyResponse A clarification requiring the end user's input to complete processing the request.
ErrorResponse A parsing error. This object is returned if the user's query is not understood in the context of the current model.


Session

An object variable that represents an existing Session object.

Request

A string that is an English question, request, or command.

Remarks
The English Query server parses a plain English question or request into a set of commands, which execute database queries and other types of responses. The client then executes the database query and displays the resulting data to the end user.
 
顶部