Groups | Blog | Home
all groups > sql server odbc > december 2006 >

sql server odbc : Can SQLPutData be used against varchar(max)?


KM
12/19/2006 8:37:00 PM
Hi,

I am trying to insert data into varchar(max) via ODBC.
When I try to insert data. I am getting following error. Is SQLPutData
supported for varchar(max)?

1394-1e4c ENTER SQLPutData
HSTMT 36665B40
PTR 0x37CDFF80
SQLLEN 20

1394-1e4c EXIT SQLPutData with return code -1 (SQL_ERROR)
HSTMT 36665B40
PTR 0x37CDFF80
SQLLEN 20

DIAG [HY000] [Microsoft][SQL Native Client]Warning: Partial
insert/update. The insert/update of a text or image column(s) did not
succeed. (0)

DIAG [42000] [Microsoft][SQL Native Client][SQL Server]The text, ntext,
or image pointer value conflicts with the column name specified. (7125)

Thank you,
KM
12/19/2006 9:42:00 PM
I realized that I was binding the parameter with SQL_LONGVARCHAR.
It worked when I used SQL_VARCHAR.
Can't we use SQL_LONGVARCHAR for binding varchar(max)? Aren't they
completely compatible?

Thank you,
KM

[quoted text, click to view]
AddThis Social Bookmark Button