I am new to MS SQL and the project need arose to bind an OUTPUT blob. Towards that I created a stored procedure which returns a nvarchar(max) type. I do not know what will be the length of this blob as this is constructed by the stored procedure.
The SQL Server that I am running this on is 2005.
I am binding in my C++ application using SQLBindParameter. This is how I am doing it.
retcode = SQLBindParameter(hStmtHandle,
This is how my stored procedure looks like
create proc ujo_delete_box
@del_dep_list nvarchar(max) OUT,
No matter what I do I don’t seem to get past the bind stage. With the way SQLBindParamter is depicted, I always end up with the below error when I try to bind the nvarchar(max) field.
Error from SQLBindParameter() Failed for stored procedure.
SQLSTATE: HY104, Native error: 0, Message: [Microsoft][ODBC SQL Server Driver]Invalid precision value
Please let me know what am I doing wrong.