TDBXTypes.INT32 value type cannot be accessed as...
TDBXTypes.INT32 value type cannot be accessed as...
I'm getting this error in some queries but I couldn't understand what's causing it.
Project Musical.exe raised exception class TDBXError with message 'TDBXTypes.INT32 value type cannot be accessed as TDBXTypes.INT32 value type'.
Any ideas? Is it related to the driver or an DBX issue?
Using D2007 and Firebird 2.1.1.
Project Musical.exe raised exception class TDBXError with message 'TDBXTypes.INT32 value type cannot be accessed as TDBXTypes.INT32 value type'.
Any ideas? Is it related to the driver or an DBX issue?
Using D2007 and Firebird 2.1.1.
-
- Posts: 13
- Joined: Thu 27 Sep 2007 21:02
I got the same error in my application after upgrading to DBexpress 4
But when the user closes the application and start again it gone. I have a client- server application and a SQL server database
Also some times the error is TDBXTypes.ZSTRINGS value type cannot be accessed value type TDBXTypes.ZSTRINGS.
I tracked that down to
dataset.params.parambyname('ID').value := ID (a integer)
and when I changed it in
dataset.params.parambyname('ID').AsInteger:= ID (a integer) I got no error messages.
The param is defined as an integer.
But when the user closes the application and start again it gone. I have a client- server application and a SQL server database
Also some times the error is TDBXTypes.ZSTRINGS value type cannot be accessed value type TDBXTypes.ZSTRINGS.
I tracked that down to
dataset.params.parambyname('ID').value := ID (a integer)
and when I changed it in
dataset.params.parambyname('ID').AsInteger:= ID (a integer) I got no error messages.
The param is defined as an integer.
I'm having the same problem using Delphi2009
The error occurs when I try to do the following in DataSetProvider.BeforeUpdateRecord event:
DeltaDS.FieldByName('fieldname').NewValue := getNewValueFunction;
Note: The GetNewValueFunction returns an Integer;
If I pass an constant value instead of the function, the error do not occur.
I hope this help to find the solution.
The error occurs when I try to do the following in DataSetProvider.BeforeUpdateRecord event:
DeltaDS.FieldByName('fieldname').NewValue := getNewValueFunction;
Note: The GetNewValueFunction returns an Integer;
If I pass an constant value instead of the function, the error do not occur.
I hope this help to find the solution.
Hi,
While trying to build the sample app, I found the problem in my code. I fought it was in the field I was trying to update, but it was in the function I used to get the new value. In this function I create a DBXCommand and make a select gen_id from a generator. To get the value and pass as result of function, I was using dbxreader.value[0].GetInt64. I just changed to GetInt32 and the problem was solved.
I just cant' see this issue before 'cause it worked with another driver and started to crash when I changed do Devart.
Sorry 'bout that guys and thanks for the support.
While trying to build the sample app, I found the problem in my code. I fought it was in the field I was trying to update, but it was in the function I used to get the new value. In this function I create a DBXCommand and make a select gen_id from a generator. To get the value and pass as result of function, I was using dbxreader.value[0].GetInt64. I just changed to GetInt32 and the problem was solved.
I just cant' see this issue before 'cause it worked with another driver and started to crash when I changed do Devart.
Sorry 'bout that guys and thanks for the support.