MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: Trouble executing MYSQL prepared statement in VB.NET
Posted by: Luis Penunuri
Date: January 15, 2016 12:26PM

Hi Joshua,

Thanks for use MySQL as your DB provider.

If the error you are getting is related to "Parameter '@sql' must be defined.", then you must add the following setting to your connection string:
Allow User Variables=true

i.e.:
Using myconn As New MySqlConnection("Server=myServer;Database=myDb;Uid=myUsr;Pwd=myPwd;Allow User Variables=True")

as indicated in the MySQL official documentation:
https://dev.mysql.com/doc/connector-net/en/connector-net-connection-options.html

Thank you, and have a good one !

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Trouble executing MYSQL prepared statement in VB.NET
672
January 15, 2016 12:26PM


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.