New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FbScript not parsing comments in SQL script. [DNET761] #703
Comments
Modified by: Andrew Ayre (aayreth)description: Some older version of the .NET Data Provider seem to work OK. This issues seems to be related to how comment are handled within an SQL script when it is parsed by FbScript. Multiline comments seem to have an issue if the comment contains a "@" character. ====== Begin SQL Example 1 ====== * * CREATE EXCEPTION ACTUAL_DATE_CANCELLATION ====== End SQL Example 1====== The error returned is: Single line comments seem to have an issue with comments occurring after the last SQL statement. ====== Begin SQL Example 2 ====== -- This is a test Exception thrown: 'System.ArgumentException' in FirebirdSql.Data.FirebirdClient.dll -- This is a test . => Some older version of the .NET Data Provider seem to work OK. This issues seems to be related to how comment are handled within an SQL script when it is parsed by FbScript. Multiline comments seem to have an issue if the comment contains a "@" character. ====== Begin SQL Example 1 ====== * * CREATE EXCEPTION ACTUAL_DATE_CANCELLATION ====== End SQL Example 1====== The error returned is: Single line comments seem to have an issue with comments occurring after the last SQL statement. ====== Begin SQL Example 2 ====== -- This is a test Exception thrown: 'System.ArgumentException' in FirebirdSql.Data.FirebirdClient.dll -- This is a test . |
Modified by: Andrew Ayre (aayreth)description: Some older version of the .NET Data Provider seem to work OK. This issues seems to be related to how comment are handled within an SQL script when it is parsed by FbScript. Multiline comments seem to have an issue if the comment contains a "@" character. ====== Begin SQL Example 1 ====== * * CREATE EXCEPTION ACTUAL_DATE_CANCELLATION ====== End SQL Example 1====== The error returned is: Single line comments seem to have an issue with comments occurring after the last SQL statement. ====== Begin SQL Example 2 ====== -- This is a test Exception thrown: 'System.ArgumentException' in FirebirdSql.Data.FirebirdClient.dll -- This is a test . => Some older version of the .NET Data Provider seem to work OK. In general this issue seems to be related to the parsing of SQL by FbScript. This issues seems to be related to how comment are handled within an SQL script when it is parsed by FbScript. Multiline comments seem to have an issue if the comment contains a "@" character. ====== Begin SQL Example 1 ====== * * CREATE EXCEPTION ACTUAL_DATE_CANCELLATION ====== End SQL Example 1====== The error returned is: Single line comments seem to have an issue with comments occurring after the last SQL statement. ====== Begin SQL Example 2 ====== -- This is a test Exception thrown: 'System.ArgumentException' in FirebirdSql.Data.FirebirdClient.dll -- This is a test . SQL Scripts containing "Commit" also seem to have issues in some situations, but don't have any details at this time. |
Commented by: @cincuranet The first one is duplicate of DNET176. |
Modified by: @cincuranet |
Submitted by: Andrew Ayre (aayreth)
Relate to DNET176
Some older version of the .NET Data Provider seem to work OK.
I think the issue was introduced on 5-Oct-2015.
In general this issue seems to be related to the parsing of SQL by FbScript.
This issues seems to be related to how comment are handled within an SQL script when it is parsed by FbScript.
Both multiline comments as well as single line comments are impacted.
Multiline comments seem to have an issue if the comment contains a "@" character.
The below is an example of valid SQL that fails to parse correctly with FbScript:
====== Begin SQL Example 1 ======
<Title Metadata\> Summary: Metadata\. Description Metadata is the collection of scripts that create the structure and supporting business rules for the Firebird Database\. All scripts are written in ANSI92 SQL language which is the language used by the Firebird Server\./*@@metadata
* *
Developers please consult the SDK for coding and documentation standards.
*/
CREATE EXCEPTION ACTUAL_DATE_CANCELLATION
'Actual Date must be null if Cancellation Reason is set.';
====== End SQL Example 1======
The error returned is:
Exception thrown: 'FirebirdSql.Data.FirebirdClient.FbException' in FirebirdSql.Data.FirebirdClient.dll
Additional information: Must declare command parameters.
Single line comments seem to have an issue with comments occurring after the last SQL statement.
The below is an example of valid SQL that fails to parse correctly with FbScript:
====== Begin SQL Example 2 ======
CREATE EXCEPTION ACTUAL_DATE_CANCELLATION
'Actual Date must be null if Cancellation Reason is set.';
-- This is a test
====== End SQL Example 2======
Exception thrown: 'System.ArgumentException' in FirebirdSql.Data.FirebirdClient.dll
Additional information: The type of the SQL statement could not be determined. See also UnknownStatement event.
Statement:
-- This is a test
.
SQL Scripts containing "Commit" also seem to have issues in some situations, but don't have any details at this time.
I will add more details regarding the issue of "Commit" within SQL script and FbScript parsing when I have more details.
The text was updated successfully, but these errors were encountered: