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.