FbScript not parsing comments in SQL script. --------------------------------------------
Key: DNET-761 URL: http://tracker.firebirdsql.org/browse/DNET-761 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 5.9.0.0 Environment: NET45. Problem may exist is other versions as well. Reporter: Andrew Ayre Assignee: Jiri Cincura 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. 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 ====== /*@@Metadata <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. * * 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 . -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider