N
nate axtell
I'm using ADO in .NET to perform a query that will return a value telling me
the succuss or failure of the procedure. I've been trying to return a
string (some sentence) when different errors occur in the procedure. I am
seeing the following error in VB when a string of characters is returned
from the procedure:
"Syntax error converting the varchar value 'returned error message string'
to a column of data type int."
My code is as follows:
oCMD = New OleDbCommand("{? = CALL cmnStartBackup}", oCnxn)
oCMD.Parameters.Add("@RetVal", OleDbType.VarChar, 100).Direction =
ParameterDirection.ReturnValue
oCMD.ExecuteNonQuery()
So it appears that even though you can set the data type of the return value
it can really only be an integer. Is this an ADO limitation or can I do
something else to allow a string to be returned?
the succuss or failure of the procedure. I've been trying to return a
string (some sentence) when different errors occur in the procedure. I am
seeing the following error in VB when a string of characters is returned
from the procedure:
"Syntax error converting the varchar value 'returned error message string'
to a column of data type int."
My code is as follows:
oCMD = New OleDbCommand("{? = CALL cmnStartBackup}", oCnxn)
oCMD.Parameters.Add("@RetVal", OleDbType.VarChar, 100).Direction =
ParameterDirection.ReturnValue
oCMD.ExecuteNonQuery()
So it appears that even though you can set the data type of the return value
it can really only be an integer. Is this an ADO limitation or can I do
something else to allow a string to be returned?