Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
It would be helpful to be able to use a variable for the Connection value when using the CONNECT Engine. I am trying to create a stored proc to create databases, but each table will reference a different DSN which is already defined. I cannot find a way to do this with a variable. I think I might be able do this by creating a string of sql and executing it, but I would prefer not to do that because of the issues with that and introducing that pattern into our app.
This works:
CREATE TABLE `MY_TEST` (
...
) ENGINE=CONNECT
table_type=ODBC
DEFAULT CHARSET=latin1
option_list='UseDSN=Yes'
CONNECTION='mydsn1';
This does not work:
CREATE TABLE `MY_TEST` (
...
) ENGINE=CONNECT
table_type=ODBC
DEFAULT CHARSET=latin1
option_list='UseDSN=Yes'
CONNECTION=var_dsn_name;
Thank you for your consideration.
Ember