CREATE DATABASE via ADO/OLEDB/ODBC
Posted in 2003
Topics: Connectivity: ODBC / JDBC / .NET
Hello everybody, Is it possible to do a CREATE DATABASE via ADO using IFX OLEDB or IFX ODBC ?, apparently there is a connection string parameter named connectdatabase that allow to establish server-only (not database) connections (connectdatabase=NO), but it does not work for me (work=NO ??? ;-) ...) TIA, Pedro
Pedro Mendoza wrote: > Is it possible to do a CREATE DATABASE via ADO using IFX OLEDB or IFX > ODBC ?, apparently there is a connection string parameter named > connectdatabase that allow to establish server-only (not database) > connections (connectdatabase=NO), but it does not work for me (work=NO > ??? ;-) ...) In ESQL/C, you can connect to the database server (and not to a database within the server) using: EXEC SQL CONNECT TO '@dbserver' [AS <conn>] [USER <user> USING <passwd>] [WITH CONCURRENT TRANSACTIONS]; I would guess that the equivalent notation (miss out the dbname from dbname@dbserver) should work for you. And you can then create and drop (and open and close) databases as you need to. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/