Mohamed Riaz wrote:
>
> hi,
> My Environment
> Linux SuSE 6.0
> MySql database
>
> I use a driver called twz1. It is of type 3.
> I follow the following syntax to invoke.
> Class.forName("twz1.jdbc.mysql.jdbcMysqlDriver);
> DriverManager.getConnection("jdbc:z1MySQL:");
>
> Using this i am able to connect only to the tables present in the default
> 'mysql' database. If i have a database with a name say xxx how do i connect
> to this using jdbc.
>
> If it is available, please excuse me and let me know the url at the
> faq-matic.
>
> thanks
> Riaz
Hi Riaz
1) The twz-driver is of type 4 (== pure Java).
2) This is definitely a mysql JDBC question not Apache JServ.
Please next time use the mailto:[EMAIL PROTECTED] mailinglist.
3) If you want to use another database, you can either specify it in the connect URL
like this:
Connection con = DriverManager.getConnection(
"jdbc:z1MySQL:/host.with.mysql.com:3306/xxx");
or you can use at any time the SQL command USE like this:
con.executeUpdate("USE xxx");
or you can add a line to the .jdbcMysql.properties file of the twz driver:
db=xxx
Tschau
Christian
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]