Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8714091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:30:22+00:00 2026-06-13T05:30:22+00:00

I am using the .net connector with mysql 5.5. When I try to call

  • 0

I am using the .net connector with mysql 5.5. When I try to call a stored procedure with an “out” parameter, I get the message OUT or INOUT argument 2 for routine name is not a variable or NEW pseudo-variable in BEFORE trigger at cmd.ExecuteNonQuery().

What is wrong?

vb code:

cmd = New MySqlCommand("call testme(@id, @count)", conn)
cmd.Parameters.AddWithValue("@id", id) ' "id" and "count" are integer variables
cmd.Parameters.AddWithValue("@count", count)
cmd.Parameters("@count").Direction = ParameterDirection.Output
cmd.ExecuteNonQuery()

mysql stored procedure:

CREATE PROCEDURE testme(in taxid integer, out imageDescCount integer)
BEGIN
set imageDescCount = 23;
End
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:30:23+00:00Added an answer on June 13, 2026 at 5:30 am

    Please try this

    Create Stored Procedure in MySQl like

    DELIMITER $$
    DROP PROCEDURE IF EXISTS `tempdb`.`GetCity` $$
    CREATE PROCEDURE  `tempdb`.`GetCity` 
    (IN cid INT,
     OUT cname VarChar(50)
    )
    
    BEGIN
    
      SET cname = (SELECT CityName FROM `City` WHERE CID = cid);
    
    END $$
    
    DELIMITER ;
    

    And Your vb.net code like

    Dim conn As  New MySqlConnection()
    conn.ConnectionString = "server=localhost;user=root;database=tempdb;port=3306;password=******;"
    Dim cmd As New MySqlCommand()
    
    conn.Open()
    cmd.Connection = conn
    cmd.CommandText = "GetCity"
    cmd.CommandType = CommandType.StoredProcedure
    cmd.Parameters.AddWithValue("@cid", "1")
    cmd.Parameters("@cid").Direction = ParameterDirection.Input
    
    cmd.Parameters.AddWithValue("@cname", MySqlDbType.String)
    cmd.Parameters("@cname").Direction = ParameterDirection.Output
    cmd.ExecuteNonQuery()
    
    Console.WriteLine("City Name: " & cmd.Parameters("@cname").Value) //Access Your Output Value
    

    Let me know if you have any problem…

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

when I try to connect to my server through MySQL Connector/NET using SSL with
I am using Mysql .Net Connector to access a database in C#. I get
I'm using MySql Connector .NET to load an account and transfer it to the
I am using MySql .net connector 6.3.6 and Visual Studio 2008 sp1. One of
I'm a beginner at this. I'm using mysql connector .net to connect vb.net with
I'm using a MySQL connector in VB .Net to execute a batch of SQL
I'm using VS2010 with the MySQL .NET Connector . My project that used to
I have a problem inserting a row using Entity Framework with the MySQL Connector/NET
I am using .net connector for mysql. I went to code a user login
I'm using a mysql .NET Connector library (Mysql.Data) in my project. As far as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.