this is a wierd one but hope someone can help
I have a stored proc which returns me nvarchar (50) - the data for this column is something like this:
23vv54sdu4 (or whatever)
the stored procedure works fine as I have ran it in Query Analyzer and the syntax is correct. it gives me the return value (the example data I gave above)
in C#, I am trying to call this stored procedure however I always get this error:
"Syntax error converting the nvarchar value '23vv54sdu4 'to a column of data type int."
but no where have I set the parameters to data type int. Any ideas:
Code:SqlParameter theCustomerIDParam = new SqlParameter("@theCustomerID", SqlDbType.Int); theCustomerIDParam.Value = theCustomerID; SqlParameter theReturnResult = new SqlParameter("@theReturnValue", SqlDbType.NVarChar, 50); theReturnResult.Direction = ParameterDirection.Output; theSQLCommand.Parameters.Add(theCustomerIDParam); theSQLCommand.Parameters.Add(theReturnResult); theSQLCommand.Connection.Open(); theSQLCommand.ExecuteNonQuery(); //error theSQLCommand.Connection.Close();





any chance of a regain? 
Reply With Quote