IBMi iDB2 SQL0180服务器上的异常,但不在本地开发计算机上

时间:2016-10-26 13:04:11

标签: db2

我在调试来自iDB2的异常时遇到了问题, SQL0180日期,时间或时间戳值的语法无效...

at IBM.Data.DB2.iSeries.iDB2Exception.throwDcException(MpDcErrorInfo mpEI, MPConnection conn)
at IBM.Data.DB2.iSeries.iDB2Command.reportDCError(Int32 rc)
at IBM.Data.DB2.iSeries.iDB2Command.execute()
at IBM.Data.DB2.iSeries.iDB2Command.ExecuteDbDataReader(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 Lincare.Enterprise.Database.DatabaseConnection.GetDataTableUsingCommand() in C:\Users\tassefa\Documents\Visual Studio 2015\Projects\AS400Test\Lincare.Enterprise.Database\DatabaseConnection.cs:line 350
at Lincare.Common.DataAccess.Database.RunStoredProcedure[TTarget](Object parameters, Boolean useIdb2DataReader, Boolean excludeSqlStateAndSQLCodeParams, String storedProcedureName) in C:\Legacy\Assemblies\Lincare.Common.DataAccess\Database.cs:line 181
at Lincare.CustomerAccountNotes.Application.NoteManager.SearchNotes(NotesSearchDto notesSearch) in C:\Legacy\Lincare.CenterUtilities\Assemblies\Lincare.CustomerAccountNotes.Application\NoteManager.cs:line 109
at Lincare.Api.CustomerAccountNotes.Controllers.NotesController.Search(NotesSearchDto notesSearch) in C:\Legacy\Lincare.CenterUtilities\Services\Lincare.Api.CustomerAccountNotes\Controllers\NotesController.cs:line 48

问题是我永远无法在本地计算机上获得该异常。我使用相同的参数测试了服务,它可以在我的本地机器上运行,但不能在开发机器上运行。

  • 每当我们尝试使用日期字段进行过滤时,问题就出现了。
  • 是的,我为两台机器使用相同的连接配置文件。
  • 我还检查了存储过程参数的日期格式字符串,它们是相同的。
  • 从两台计算机传递到数据库的所有参数都完全相同。
  • 我检查了两台计算机上的ODBC驱动程序,检查它们是否具有相同版本的Client Access,并且它们(13.0.10.0)。

对于我的机器和服务器,数据库的行为似乎不同。有人遇到过这样的问题吗?请告诉我。

0 个答案:

没有答案