I'm scratching my head here... I am getting a fairly nondescript error while doing a fairly simple task...

I'm scratching my head here... I am getting a fairly nondescript error while doing a fairly simple task...

I have a TFDTable object connected to a Pervasive SQL database. When I attempt to do a FindKey on it, I get

[FireDAC][Phys][ODBC][W3ODBCCI.DLL] SQL_ERROR.

This exact same code works elsewhere. I have tried replacing the FDTable.FindKey with an FDQuery and an appropriate SELECT, and I get the same error.

As this error tells me basically NOTHING, I was wondering if anyone had any ideas about how I could go about narrowing this down?

Comments

  1. Do you have any native pervasive sql tool? Does the sql work in the native tool?

    ReplyDelete
  2. It does indeed... It also works in an older pre-FireDAC ADO application on the same workstation?!

    ReplyDelete
  3. Update: The issue appears to be related to a master/detail relationship involving this FDTable... When I use its datasource as a MasterSource for another FDTable, this is what triggers the error when I call FindKey. If I remove the datasource or at least decouple it from the detail table, it works... Ideas?

    ReplyDelete
  4. Please specify your RAD Studio version and provide the call stack for the exception.

    ReplyDelete
  5. I'm working in 10-Seattle

    Call stack:

    [00EC4819] FireDAC.Stan.Error.FDException
    [00F67285] FireDAC.Phys.ODBCWrapper.TODBCHandle.ProcessError
    [00F67303] FireDAC.Phys.ODBCWrapper.TODBCHandle.Check
    [00F70A42] FireDAC.Phys.ODBCWrapper.TODBCCommandStatement.Execute
    [00F70A88] FireDAC.Phys.ODBCWrapper.TODBCCommandStatement.Execute
    [00F787EC] FireDAC.Phys.ODBCBase.TFDPhysODBCCommand.InternalOpen
    [00F5629B] FireDAC.Phys.TFDPhysCommand.OpenBase
    [00F563AB] FireDAC.Phys.TFDPhysCommand.OpenBase
    [00F55D3B] FireDAC.Phys.TFDPhysCommandAsyncOpen.Execute
    [00F29DD6] FireDAC.Stan.Async.TFDStanAsyncExecutor.Run
    [00F541F2] FireDAC.Phys.TFDPhysCommand.ExecuteTask
    [00F564D6] FireDAC.Phys.TFDPhysCommand.Open
    [0100FF37] FireDAC.Comp.Client.TFDCustomCommand.InternalOpen
    [010101B2] FireDAC.Comp.Client.TFDCustomCommand.SetActiveBase
    [010101EC] FireDAC.Comp.Client.TFDCustomCommand.Open
    [01016472] FireDAC.Comp.Client.TFDAdaptedDataSet.DoOpenSource
    [0101C2DB] FireDAC.Comp.Client.TFDTable.FetchWindow
    [0101C8EA] FireDAC.Comp.Client.TFDTable.InternalFirst
    [00D78B11] Data.DB.TDataSet.First
    [0101DAE8] FireDAC.Comp.Client.TFDTable.CheckMasterRange
    [00FDF499] FireDAC.Comp.DataSet.TFDDataSet.MasterChanged
    [0101DA67] FireDAC.Comp.Client.TFDTable.MasterChanged
    [00FDD36F] FireDAC.Comp.DataSet.TFDMasterDataLink.RecordChanged
    [0040F7B8] System._IntfClear
    [00D702E0] Data.DB.TDataLink.DataSetChanged
    [761FCC3B] USER32.DispatchMessageW
    [009A4F34] FMX.Platform.Win.TPlatformWin.HandleMessage
    [00A22BF7] FMX.Forms.TApplication.HandleMessage
    [009A4D7F] FMX.Platform.Win.TPlatformWin.Run
    [00A249BD] FMX.Forms.TApplication.Run
    [0112F8FF] wcImport.Initialization (Line 42, "wcImport.dpr")
    [75A6EF8A] kernel32.BaseThreadInitThunk

    ReplyDelete
  6. Ok, it may be fixed already. Check, if you have NumericFormat connection parameter. If you does not have - it is not fixed in your version. If you have - try to set it to String.

    ReplyDelete

Post a Comment