From: Pyt Date: November 20 2005 9:55am Subject: Re: "Function Does Not Exist" List-Archive: http://lists.mysql.com/dotnet/847 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14848_15293504.1132480534768" ------=_Part_14848_15293504.1132480534768 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Does it work if you use a standard command type, and use "call sp_InserNewCamper();" as the command string ? Pyt. On 11/18/05, Jesse Castleberry - JesseC@stripped<+mysql+pyt+c1ac2e3ccd.JesseC#msdlg.com@ spamgourmet.com > wrote: > > I'm using the following code in my ASP.NET application t= o > add a new record > to the database, and return the added ID: > > Cmd=3DNew MySqlCommand("sp_InsertNewCamper",Conn) > Cmd.CommandType =3D CommandType.StoredProcedure > paramReqID =3D Cmd.Parameters.Add("return",SqlDbType.Int) > paramReqID.Direction =3D ParameterDirection.ReturnValue > Cmd.Parameters.Add("FirstName",FirstName.Text) > Cmd.Parameters.Add("LastName",LastName.Text) > Cmd.Parameters.Add("UserName",UserName.Text) > Cmd.Parameters.Add("Password",Password.Text) > > Cmd.ExecuteNonQuery() > cID =3D CStr(Cmd.Parameters("return").Value) > > When I execute this code, I get the error, "#42000FUNCTION > fccamp.sp_InsertNewCamper does not exist". However, it DOES exist. I can > see it. It's named exactly the same, there are no misspellings or > anything. > One other difference is that this is calling it a "function" where it is > actually a procedure. I could make this a function, I guess, however, I > don't know how to write the code in ASP.NET to grab the > return value. > > I've checked Google, and found very little on this error, and don't even > know what to look for in the manual. Does anyone know what might be going > on > here? > > Thanks, > Jesse > > > -- > MySQL on .NET Mailing List > For list archives: http://lists.mysql.com/dotnet > To unsubscribe: > http://lists.mysql.com/dotnet?unsub=3Dpyth.mysql.5.pyt@stripped > > ------=_Part_14848_15293504.1132480534768--