MySQL Forums
Forum List  »  Stored Procedures

#42000Incorrect number of arguments for PROCEDURE
Posted by: steve hall
Date: August 27, 2005 05:17AM

When I run the Stored Procedure from MySQLCC it works fine but when it is called from a .net it gets the error:

#42000Incorrect number of arguments for PROCEDURE XX.XX; expected x, got 0

The code in my .net would appear correct:

Dim con As New MySqlConnection(connectionString)
Dim cmd As New MySqlCommand("InsertBusiness", con)

cmd.CommandType = CommandType.StoredProcedure

[list of params here]

cmd.Parameters.Add(New MySqlParameter("?BizSubCat", MySqlDbType.VarChar, 50))
cmd.Parameters("BizSubCat").Value = Biz.BusinessSubCat

Try
con.Open()

cmd.ExecuteNonQuery()
Return CType(cmd.ExecuteScalar(), Integer)

........

Can anyone offer any suggestions?
thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
#42000Incorrect number of arguments for PROCEDURE
3640
August 27, 2005 05:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.