[unixODBC-dev] [DSN] create database
ikorot at earthlink.net
ikorot at earthlink.net
Thu Jul 29 06:17:01 BST 2010
Carlo,
-----Original Message-----
>From: Carlo Cancellieri <ccancellieri at hotmail.com>
>Sent: Jul 28, 2010 10:41 PM
>To: unixodbc-dev at mailman.unixodbc.org
>Subject: [unixODBC-dev] [DSN] create database
>
>
>Hi to all,
>I'm coding a script to run some tests on my application and I'd like to create a new database but seams that I can't use isql to run a query without set a DSN. that's ok but why I've to set a database too?
>-------------------------------odbc.ini
>[PostgreSQL]
>Description = Test to Postgres
>Driver = /opt/unixodbc/lib/libodbcpsql.so
>Trace = Yes
>TraceFile = sql.log
>######################
>#Database = SQLH <--------PROBLEM
>######################
>Servername = localhost
>UserName = postgres
>Password = postgres
>Port = 5432
>Protocol = 6.4
>ReadOnly = No
>RowVersioning = No
>ShowSystemTables = No
>ShowOidColumn = No
>FakeOidIndex = No
>ConnSettings =
>-----------------------------------------
>
>I want to create that database so how I can do this?
>I've already tried to use a DSN without set the Database but this is what I get:
>/opt/unixodbc/bin/isql -c -v PostgreSQL
>[28000][unixODBC]FATAL: database "SQLH" does not exist
>[ISQL]ERROR: Could not SQLConnect
>
>So the only way I found is :
>1 define a DSN connecting to the default postgres database,
>2 run the query CREATE DATABASE...
>3 exit
>4 configure a new DSN with the new database
>5 connect on the new database
>6 use it
>
>Is there a way to create the database before completely define a DSN?
>If no, is there a way to query the DBMS to get a list of available database to configure (I know the postgres one but what about mysql? oracle? etc.)
mySQL does have a default database.
M$ SQL Server also does have a default database. Since Sybase is the same then it should also have a default database.
Not sure about any other.
Thank you.
>any help is appreciated, thank you,
>carlo cancellieri
>
>_________________________________________________________________
>Il tuo mondo MSN a portata di clic. Scarica IE8 per MSN
>http://events.it.msn.com/internet-explorer-8
>_______________________________________________
>unixODBC-dev mailing list
>unixODBC-dev at mailman.unixodbc.org
>http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
More information about the unixODBC-dev
mailing list