Retrieving Text data type - help

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I have a stored procedure in SQL Server:

procedure proc_xxx
@textOut Text output
As
Declare @ptrval varbinary(16)

Select @textOut = someTextField
From myTable
Where...
READTEXT myTable.someTextField @ptrval 0 0

I'm also using the MS Data Access Application Block, which
I doubt is the problem here, with the following code
snipet:

parms[1] = new SqlParameter("@someTextField",
SqlDbType.Text);
parms[1].Direction = ParameterDirection.Output;

SqlHelper.ExecuteNonQuery(_connectionString,
CommandType.StoredProcedure,
"proc_xxx", parms);

When executing, I get the following error message:
Parameter 1: '@someTextFieldof type: String, the property
Size has an invalid size: 0

Where am I going wrong? in the stored procedure? in the
SqlDbType setting?

Thanks
Alex Dinu
(e-mail address removed)
 
Back
Top