The example in this article describes the method by which vb.net invokes the MySQL stored procedure and obtains the return value. Share to everyone for your reference. The implementation methods are as follows:
Dim myconnectionstring as String = "database=" & MyDatabase & _
";D ata source=" & MyHost & _
"; User id= "& myUserID &"; Password= "& MyPassword
Dim myconnection as New mysqlconnection (myconnectionstring)
Try
Myconnection.open ()
Catch myexception as Mysqlexception
Console.WriteLine ("Connection Error:mysql Code:" & Myexception.number & _
"" + myexception.message) End
Try
try
Dim mycommand as New Mysqlcomma nd ("Call Error_test_proc (1)")
mycommand.connection = myconnection
mycommand.executenonquery ()
Catch myexception as Mysqlexception
Console.WriteLine ("Stored Procedure Error:mysql Code:" & _
Myexception.number & "" & _
Myexception.message) End
Try
I hope this article will help you with the vb.net program design.