I was trying to generate a C# Model using the C# model generator and I got the error below:
System.Data.Odbc.OdbcException (0x80131937): ERROR [HY000] [ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -104
Token unknown - line 12, column 29
1
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at SnapDevelop.DbConnector.Odbc.OdbcSchemaProvider.GetColumnSchemas(String tableName, String schema)
at SnapDevelop.DbConnector.Services.DbSchemaProvider.ChangeDatabase(String databaseName, Boolean reload)
at SnapDevelop.DbConnector.Services.DbSchemaProvider.GetTable(String databaseName, String tableName, String schema)
at PowerBuilder.Exporter.DataWindow.DataWindowParser.ParseModelAttribute(DataWindowModel model, IReadOnlyDataObject dataObject, IDbSchemaProvider provider)
at PowerBuilder.Exporter.DataWindow.DataWindowParser.FillDataWindow(DataWindowModel model, IReadOnlyDataObject dataObject, IDbSchemaProvider provider)
The SQL statement in the datawindow is:
SELECT donornum,
date_received,
total_amount,
categorynum,
donationnum,
cheque_no,
notes,
eligible_amount,
dup,
transaction_id
FROM donation
WHERE donornum = :donornum
ORDER BY date_received DESC
The connection to my Firebird server was successful. And I don't understand the numbers, like there's no line 12 and column 29 in the SQL select, where are those numbers coming from?
And how can I solved this problem? When I have this error, I can not do the next step as exporting the model to a .net project.
I've attached the srd file for my datawindow for your reference.
Thank you for your help.