We've investigated a number of your suggestions and are still stuck.
We had been using the 3.0.1 Professional version with the MySQL assembly having an 869k file size. We've completely uninstalled then reinstalled with 3.0.5 and have the same issue.
We tried using the minimal install instead of our installer putting the needed assemblies into the GAC, also with no luck.
We can use an ODBC connection to the same database (localhost, root, password, dbname) that we're trying to use the direct MySQL connection via UniDirect. This application works fine on most machines, but on our client's (and our testbed) more locked down machines, it fails with the AsmNotLoaded message in the exception.
I've checked and the assemblies are present in C:\Windows\assembly. The DbProviderFactories section of machine.config does contain the dotConnect Universal entry. However, the machine.config file does *not* contain a section at the end. Could this be the problem?
Search found 2 matches
- Thu 21 Jan 2010 22:17
- Forum: dotConnect Universal
- Topic: "AsmNotLoaded" error when attempting to connect to database
- Replies: 10
- Views: 3855
- Thu 12 Nov 2009 16:39
- Forum: dotConnect Universal
- Topic: Using string parameters for items other than values
- Replies: 1
- Views: 2750
Using string parameters for items other than values
I'm trying to use parameters to build a command where the table name is inserted dynamically. However, the table name string is inserted into the command with single quotes which generate SQL errors. Here's a simple example:
String^ tname = "mytable";
uniCmdSelectAll->CommandText = "select * from :tablename";
uniCmdSelectAll->Parameters->Clear();
uniCmdSelectAll->Parameters->Add(":tablename",tname);
Devart::Data::Universal::UniDataReader^ tableReader = uniCmdSelectAll->ExecuteReader();
ExecuteReader() throws an exception because it tries to issue the following SQL:
select * from 'mytable'
Is there any way to use parameters to reference table names and/or to force it to not translate with single quotes?
PS I'm using the 3.0.1 beta.
String^ tname = "mytable";
uniCmdSelectAll->CommandText = "select * from :tablename";
uniCmdSelectAll->Parameters->Clear();
uniCmdSelectAll->Parameters->Add(":tablename",tname);
Devart::Data::Universal::UniDataReader^ tableReader = uniCmdSelectAll->ExecuteReader();
ExecuteReader() throws an exception because it tries to issue the following SQL:
select * from 'mytable'
Is there any way to use parameters to reference table names and/or to force it to not translate with single quotes?
PS I'm using the 3.0.1 beta.