[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: JDBC help



>   how to create a database using JDBC ??
>   is there any extra setup to be done ??

Hi,

You can either create the database outside of Java, via tools supplied
by the database vendor, or via SQL statements fed to the database from a
Java program.

 stmt.execute(   "create table JoltData ("+
                                "programmer varchar (32),"+
                                "day char (3),"+
                                "cups integer);"
                            );

will create a new table for you.

If youre using MySQL as your database, you can use a Class 4 JDBC driver
(mm.mysql driver is downloadable). 

HTH,
rohit


-- 
First law of debate:
	Never argue with a fool.  People might not know the difference.