Puiu Posted January 22, 2006 Posted January 22, 2006 I have a stored proc something like this: Create proc AddAgent @param1 varchar(20), @param2 varchar(30) As Declare @Message varchar(200) �. Set @Message = �Some text� Return @Message When I call this proc from vb.net 2005 it returns an error saying: "Conversion failed when converting the varchar value 'Some text' to data type int." Any ideas? My guess is that it has something to do with the return statement In VB the syntax for the parameter is the following: Dim pMessage As New SqlParameter() pMessage.ParameterName = "@Message" pMessage.Direction = ParameterDirection.ReturnValue pMessage.SqlDbType = SqlDbType.VarChar pMessage.Size = 200 sqlComm.Parameters.Add(pMessage) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.