ODBC Provider Error - Timestamp parameters with zero scale must have.......
ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hi
When using ODBC provider I get this error when trying to insert or update a value in a timestamp field.
"[DataDirect][ODBC Progress OpenEdge Driver]Timestamp parameters with zero scale must have a precision of 13, 16, or 19. Parameter number: 1, precision: 0."
I can use an ODBC parameter "WorkArounds2=2" to stop this but WorkArounds2 partameter is needed to for another problem using a different value and also I don't want my customer to have to put this on every computer.
Is there any way I stop this error? Maybe using Data Type Mapping Rules?
When using ODBC provider I get this error when trying to insert or update a value in a timestamp field.
"[DataDirect][ODBC Progress OpenEdge Driver]Timestamp parameters with zero scale must have a precision of 13, 16, or 19. Parameter number: 1, precision: 0."
I can use an ODBC parameter "WorkArounds2=2" to stop this but WorkArounds2 partameter is needed to for another problem using a different value and also I don't want my customer to have to put this on every computer.
Is there any way I stop this error? Maybe using Data Type Mapping Rules?
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hello,
Please open access to server again, in order for us to try to reproduce the problem.
Please open access to server again, in order for us to try to reproduce the problem.
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hello Alex
Connection details sent to your email
Connection details sent to your email
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hello,
There is no DATE_ADDED field in the PUB.ORT_REPORTS table, there is a DATE_CREATED field only, and I get a 'permission denied' error when attempting to modify it. Please clarify the table and the field, and check the access privileges.
There is no DATE_ADDED field in the PUB.ORT_REPORTS table, there is a DATE_CREATED field only, and I get a 'permission denied' error when attempting to modify it. Please clarify the table and the field, and check the access privileges.
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Sorry Alex
Forgot to grant you insert, update, delete on this table.
As you say the field is DATE_CREATED.
Forgot to grant you insert, update, delete on this table.
As you say the field is DATE_CREATED.
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
hello,
Thank you for the information - we have reproduced the described situation. This behaviour is due to the specificity of the ODBC driver. In the MSDN documentation http://msdn.microsoft.com/en-us/library ... s.85).aspx it is claimed that the ColumnSize parameter and DecimalDigits are ignored in the SQLBindParameter method for SQL_TIMESTAMP types. However, the driver you are using (in contrast to the documentation) requires setting the ColumnSize parameter for this type. To solve the problem, you can either use the WorkArounds2=2 ODBC parameter or, if you have an edition with source code, we can tell the required modifications for setting a value for this parameter.
Thank you for the information - we have reproduced the described situation. This behaviour is due to the specificity of the ODBC driver. In the MSDN documentation http://msdn.microsoft.com/en-us/library ... s.85).aspx it is claimed that the ColumnSize parameter and DecimalDigits are ignored in the SQLBindParameter method for SQL_TIMESTAMP types. However, the driver you are using (in contrast to the documentation) requires setting the ColumnSize parameter for this type. To solve the problem, you can either use the WorkArounds2=2 ODBC parameter or, if you have an edition with source code, we can tell the required modifications for setting a value for this parameter.
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Many thanks for investigating this problem for me.
I am upgrading to UniDAC edition with source code so if you could please send me the details of where to change the code that would be great.
I am upgrading to UniDAC edition with source code so if you could please send me the details of where to change the code that would be great.
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hello,
To solve the problem, you should modify the TODBCCommand.DetectDataType method in the ODBCClassesUni.pas module as follows:
replace
with
To solve the problem, you should modify the TODBCCommand.DetectDataType method in the ODBCClassesUni.pas module as follows:
replace
Code: Select all
SQL_TYPE_TIMESTAMP, SQL_TIMESTAMP:
DataType := dtDateTime;Code: Select all
SQL_TYPE_TIMESTAMP, SQL_TIMESTAMP: begin
DataType := dtDateTime;
Length := SQLLength;
end;Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
As always you came up a solution.
Thanks again.
Thanks again.
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hello,
If you have any other questions, feel free to contact us
If you have any other questions, feel free to contact us
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
Hi Alex
Is there any possibility that a specific option could be added in the future for the connection or dataset objects to the deal with this problem?
Is there any possibility that a specific option could be added in the future for the connection or dataset objects to the deal with this problem?
Re: ODBC Provider Error - Timestamp parameters with zero scale must have.......
As I wrote earlier, this problem is due to the driver you are using and it doesn't occur in any other ODBC driver. Unfortunately, we cannot add separate options for each specific driver, specification of which differs from the MSDN specification. Therefore you should either use the recommendations of your driver developer: use the WorkArounds2=2 ODBC parameter, or edit our code.