VistaDB 5






SQL Command Text
Line number in the text, where mistake occurred
Symbol number in the text, where mistake occurred
Error message
IsSyntaxCorrect Method
Check SQL command correctness. This does not actually execute the command or validate the structures on disk. It only parses the command and attempts to verify that the parser can split the tokens or not.
Syntax
'Declaration
 
Public Function IsSyntaxCorrect( _
   ByVal text As System.String, _
   ByRef lineNo As System.Integer, _
   ByRef symbolNo As System.Integer, _
   ByRef errorMessage As System.String _
) As System.Boolean
'Usage
 
Dim instance As VistaDBConnection
Dim text As System.String
Dim lineNo As System.Integer
Dim symbolNo As System.Integer
Dim errorMessage As System.String
Dim value As System.Boolean
 
value = instance.IsSyntaxCorrect(text, lineNo, symbolNo, errorMessage)
public System.bool IsSyntaxCorrect( 
   System.string text,
   out System.int lineNo,
   out System.int symbolNo,
   out System.string errorMessage
)
public function IsSyntaxCorrect( 
    text: System.String;
   Out  lineNo: System.Integer;
   Out  symbolNo: System.Integer;
   Out  errorMessage: System.String
): System.Boolean; 
public function IsSyntaxCorrect( 
   text : System.String,
   lineNo : System.int,
   symbolNo : System.int,
   errorMessage : System.String
) : System.boolean;
public: System.bool IsSyntaxCorrect( 
   System.string* text,
   [PARAMFLAG::Out] System.int lineNo,
   [PARAMFLAG::Out] System.int symbolNo,
   [PARAMFLAG::Out] System.string* errorMessage
) 
public:
System.bool IsSyntaxCorrect( 
   System.String^ text,
   [Out] System.int lineNo,
   [Out] System.int symbolNo,
   [Out] System.String^ errorMessage
) 

Parameters

text
SQL Command Text
lineNo
Line number in the text, where mistake occurred
symbolNo
Symbol number in the text, where mistake occurred
errorMessage
Error message

Return Value

Returns true if syntax is correct otherwise returns false
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also