Page 1 of 1

ODBC function "SQLBindParameter" reported: SQLSTA

Posted: Thu Sep 05, 2013 4:06 am
by nishantrk
Hi

I am trying to update SQLServer DB reading data from a dataset.
while updating the DB i am getting the below error.

ODBC_STGY_STR,0: ODBC function "SQLBindParameter" reported: SQLSTATE = HY104: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Legacy Driver]Invalid precision value (CC_OdbcDBStatement::dbsBindInputs, file CC_OdbcDBStatement.cpp, line 404)

Dataset column definition

(
LOC_I:int16 {quote=none};
GO_D:nullable timestamp {null_field=''};
SITE_TYPE_C:nullable string[1] {null_field=''};
MDSE_LVL_Q:nullable int16 {quote=none, null_field=''};
BLDG_LVL_Q:nullable int16 {quote=none, null_field=''};
)

Table definition
LOC_I,smallint,no,2,5 ,0 ,no,(n/a),(n/a),NULL
GO_D,datetime,no,8, , ,yes,(n/a),(n/a),NULL
SITE_TYPE_C,char,no,1, , ,yes,no,yes,SQL_Latin1_General_CP1_CI_AS
MDSE_LVL_Q,smallint,no,2,5 ,0 ,yes,(n/a),(n/a),NULL
BLDG_LVL_Q,smallint,no,2,5 ,0 ,yes,(n/a),(n/a),NULL


The dataset definitions have been directly imported throught table definition import utitlity .Also this job is working fine in the DEV enviorment but failing in TEST enviroment. We think it might be due to some setting either in Dataste or at dATABASE IN sql server..Can you please help us with this ..thanks

Posted: Thu Sep 05, 2013 5:10 am
by ray.wurlod
The only data types that support precision in your example are the datetime/timestamp and the string/char. Check the precision settings for these in the database tables to which each environment (dev and the other) connects.