CODPCRIDataTable GENCODPCRITableAdapter.GetDataGen(int? INCR_GEN)
int teste = genPcriTA.GetDataGen(i).Count; // Aqui já dá erro.
Stack trace:
FirebirdSql.Data.FirebirdClient.FbException: Dynamic SQL Error
SQL error code = -206
Column unknown
INCR_GEN
At line 1, column 32. ---> FirebirdSql.Data.Common.IscException: Exception of type 'FirebirdSql.Data.Common.IscException' was thrown.
at FirebirdSql.Data.Client.Gds.GdsConnection.ReadStatusVector()
at FirebirdSql.Data.Client.Gds.GdsConnection.ReadResponse()
at FirebirdSql.Data.Client.Gds.GdsDatabase.ReadResponse()
at FirebirdSql.Data.Client.Gds.GdsStatement.Prepare(String commandText)
at FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean returnsSet)
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet)
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior)
--- End of inner exception stack trace ---
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior behavior)
at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet
dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords,
String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at VendasJRSWs.DSVendasJRSWsTableAdapters.GET_GENCODPCRI1TableAdapter.FillByGen(GET_GENCODPCRI1DataTable dataTable, Nullable`1 INCR_GEN) in C:\WinJRS\vendasjrs\VendasJRSWs\DSVendasJRSWs.Designer.cs:line 11297
at VendasJRSWs.Pedidos.getGenerator(Campo campo, Int32 incremeto) in C:\WinJRS\vendasjrs\VendasJRSWs\Pedidos.asmx.cs:line 108
at VendasJRSWs.Pedidos.InsereItemPedido(Int32 codpcrc, Int32 genCodpcrc, String codpro, Decimal qtdade, Decimal vrunit) in C:\WinJRS\vendasjrs\VendasJRSWs\Pedidos.asmx.cs:line 210