Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / July 2005

Tip: Looking for answers? Try searching our database.

Specify database name after connecting to Informix db via JDBC

Thread view: 
veerleverbr@hotmail.com - 30 Jun 2005 12:02 GMT
Hi,

I have an Informix database on my pc which is named INNO040. My
database server is called ol_inno040. When installing Informix, 3
databases where created on my server by the installation process. Using
dbaccess I, created a 4th database called testpush on this server.

I have a Java program that creates tables in my testpush database. For
connecting to the database I use the connection string
"jdbc:informix-sqli://INNO040:1526:informixserver=ol_inno040"
But when I then execute the statement "create table ..." using the
classes in the java.sql package, I get the error:
"Database not selected yet". I understand the problem: ol_inno040
contains 4 databases and JDBC does not know in which one it has to
create the tables. But how do I specify the database that I want to use
in JDBC?

Any ideas?
Veerle
veerleverbr@hotmail.com - 07 Jul 2005 08:54 GMT
Found it, the connection string is:
"jdbc:informix-sqli://INNO040:1526/TestPush:informixserver=ol_inno040"


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.