本文介绍了使用Microsoft.Data.Schema.ScriptDom解析存储过程参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种使用Microsoft.Data.Schema.ScriptDom解析存储过程的参数默认值的方法。

I am looking for a way to parse the parameter defaults of a stored procedure using Microsoft.Data.Schema.ScriptDom.

我正在尝试解析用它来发短信。一些程序在文本中非常大(20 +数千行)

I am trying to do it bu parsing the text with it. Some procedures are very large in text (20+thousands of lines)

我所理解的是这个类标记为全文,而不是仅启动前向标记集并仅解析当前部分文本,因为参数最多是在第一对的几百行中。

What I understand is this class tokenizes to full text , instead of starting a forward only token set and only parsing the current portion of the text, since the parameters are in the first couple hundred rows the most.

我一直在阅读文档 但是我找不到好运。

I have been going through the documentation but I have not have good luck finding it.

问题1:有没有更快的方法只解析当前的tokey

Question 1: is there a faster way of only parsing the current tokey

问题2:我需要用什么类来解析存储的程序(代码 代码段 下面解析sql语句)

Question 2 : what class I need to be using to parse a stored procedure (the code snippet below parses a sql statement)

提前谢谢

 

 


TSql100Parser mParser = new TSql100Parser(true);
Sql100ScriptGenerator gen = new Sql100ScriptGenerator();
System.Collections.Generic.IList<ParseError> Errors;
IScriptFragment result = mParser.Parse(new StringReader(SQL.Value), out Errors);
System.Collections.Generic.IList<TSqlParserToken> tokens = gen.GenerateTokens((TSqlFragment)result);

推荐答案

这个是一个快速通知,让您知道我们正在对此问题进行研究,并会尽快回复您。感谢您的耐心等待。

This is a quick note to let you know that we are performing research on this issue and will get back to you as soon as possible. I appreciate your patience.

最诚挚的问候,


这篇关于使用Microsoft.Data.Schema.ScriptDom解析存储过程参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 08:46