重要的人越来越少,剩下的越来越重要。拼你想要的,争你没有的。要想人前显贵,就得背后遭罪。最穷不过要饭,不死终会出头!
本文实例讲述了VB.NET调用MySQL存储过程并获得返回值的方法。分享给大家供大家参考。具体实现方法如下:
Dim myConnectionString As String = "Database=" & myDatabase & _ " ;Data 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 MySqlCommand("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
希望本文所述对大家的VB.NET程序设计有所帮助。
本文VB.NET调用MySQL存储过程并获得返回值的方法到此结束。人生就像一个大舞台,每个人都有自我所要扮演的主角。至于要表演甚么主角,自我去决定。小编再次感谢大家对我们的支持!