Hi,
Since the updated universal dotconnect release for Visual Studio 2015 the parameters aren't working for mysql.
Running the same query, but replacing the parameter with quoted text i get the correct results.
I made a sample: http://mobra.erpos.ro/Products/UniDirectTest.zip
Any idea?
Universal dotconnect mysql parameter problem
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Universal dotconnect mysql parameter problem
dotConnect Universal has two types of the named parameters. The difference between them lies in prefixes ':' and '@'. Name of the UniParameter object in the command collection should contain the '@' prefix, if parameter in CommandText is used with the '@' prefix. For more information, please refer to https://www.devart.com/dotconnect/unive ... eters.html
To fix the issue, add the '@' character before the parameter name. Your code should look like the following:
To fix the issue, add the '@' character before the parameter name. Your code should look like the following:
Code: Select all
string commandText = string.Format(txtCommand.Text, "@ModuleId");
UniCommand cmd = new UniCommand(commandText, this.connection);
UniParameter p = new UniParameter("@ModuleId", UniDbType.VarChar);
Re: Universal dotconnect mysql parameter problem
Thank you, it seems that it works, at least in this example.
Pretty annoying update, i have a few hundred queies (or better, thousands) in a single app, and is working well with version 3.5. Now i must update to 3.6 and all of them are broken
Thank you, again.
m.
Pretty annoying update, i have a few hundred queies (or better, thousands) in a single app, and is working well with version 3.5. Now i must update to 3.6 and all of them are broken
Thank you, again.
m.