Retrieving Text data type - help

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top