Re: [DSN] create database

[email protected]
Newsgroups gmane.comp.db.unixodbc.devel
Message-ID <24954575.1280380622109.JavaMail.root@elwamui-little.atl.sa.earthlink.net>
Carlo,


-----Original Message-----
>From: Carlo Cancellieri <[email protected]>
>Sent: Jul 28, 2010 10:41 PM
>To: [email protected]
>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
>[email protected]
>http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev

_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.