Can't bind VARCHAR variables tru ODBC driver

Connectivity

Can't bind VARCHAR variables tru ODBC driver

Hi All!

I'm use Teradata ODBC driver ver. 13.10.00.01-1. I need to bind variables but I've got a problems with VARCHAR variables (the INTEGER or DOUBLE variables are OK)

The source:

SQLBindParameter(v_stmt->stmt,
i,SQL_PARAM_INPUT_OUTPUT,col->obtype,col->dbtype,
col->dblen,scale,v_col->data,col->dblen,
v_col->len)

col->dbtype=SQL_VARCHAR;
col->obtype=SQL_C_CHAR;
col->dblen=255;
scale=0;
v_col->data; //pointer to data
v_col->len; //pointer to data's length

After executing SQLExecute - column is empty. As I said the result of SQLExecute with INTEGER or DOUBLE variables is OK. The problem only with VARCHAR variables
1 REPLY
Teradata Employee

Re: Can't bind VARCHAR variables tru ODBC driver

Why do you initialize the dbtype, obtype and dblen after the call to SQLBindParameter?

I suggest experimenting with a simple example similar to:
http://msdn.microsoft.com/en-us/library/ms710963(VS.85).aspx