000115180
Fractional truncation returned as SQL_ERROR using the ODBC SQL Server driver.
Information |
Title | Fractional truncation returned as SQL_ERROR using the ODBC SQL Server driver. |
---|
URL Name | Fractional-truncation-reported-as-SQL-ERROR-on-linux64-for-SQLserver-Driver |
---|
Article Number | 000115180 |
---|
Environment | Product: Connect for ODBC SQL Server driver
Version: 7.0/7.1 OS: Linux Database: SQL Server Application: All supported applications |
---|
Question/Problem Description |
|
---|
Steps to Reproduce | -Table DDL :
create table test (col1 Decimal(18,2)) -SQLPrepare(INSERT INTO test(col1) VALUES ( ?)) -SQLBindParameter with value having too many fractional digits like 1254.135 : SQLBindParameter((SQLHSTMT)hstmt, 1,SQL_PARAM_INPUT, SQL_C_CHAR, SQL_NUMERIC, 18, 2, num, 100, &cb_dsi_key_id_); -SQLExecute ((SQLHSTMT)hstmt); -Observed results using ODBC 3.x: EXIT SQLExecute with return code -1 (SQL_ERROR) HSTMT 0x00000003f5b2f0 EXIT SQLError with return code 0 (SQL_SUCCESS) HENV 0x00000003f2fa40 HDBC 0x00000003f38500 HSTMT 0x00000003f5b2f0 UCHAR * 0x007fff742cd400 [ 5] "22001" SDWORD * 0x007fff742cd3fc (0) UCHAR * 0x007fff742cd1f0 [ 101] "[DataDirect][ODBC SQL Server Wire Protocol driver]String data, right truncated. Error in parameter 1." SWORD 511 SWORD * 0x007fff742cd3fa (101) -Observed results using ODBC 2.x: EXIT SQLExecute with return code 1 (SQL_SUCCESS_WITH_INFO) HSTMT 0x000000000079D970 DIAG [01004] [DataDirect][ODBC SQL Server Wire Protocol driver]Fractional truncation. Error in parameter 1. (0) |
---|
Clarifying Information |
---|
Error Message | [DataDirect][ODBC SQL Server Wire Protocol driver]String data, right truncated. Error in parameter 1. (ODBC 3.x)
[DataDirect][ODBC SQL Server Wire Protocol driver]Fractional truncation. Error in parameter 1. (ODBC 2.x) |
---|
Defect Number |
---|
Enhancement Number |
---|
Cause |
|
---|
Resolution |
|
---|
Workaround |
---|
Notes |
---|
Last Modified Date | 11/6/2017 8:35 PM |
---|
Files |
Disclaimer |
The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information. Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages. |