Luc,
Unless you are required to use ODBC, you may want to try the
mm mysql JDBC driver:
http://www.worldserver.com/mm.mysql/
Then you can connect to a MySQL DB named "mydb" on your localhost (NT or
Unix)
this way:
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
try {
Conn = DriverManager.getConnection(
"jdbc:mysql://localhost/mydb");
Stmt = Conn.createStatement();
} catch (SQLException e) {
//...
} catch (Exception e) {
//...
}
The syntax for a connection is:
jdbc:mysql://[hostname][:port]/dbname[?param1=value1][¶m2=value2]...
where params can be: user, password, ...
Ken.
--
Ken Kress [EMAIL PROTECTED]
Osprey Partners LLC 610.240.7289
----- Original Message -----
From: "luc gross" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 13, 2000 8:34 AM
Subject: database connection
> hi list.
>
> i am in trouble connecting to my mysql database on localhost.....
> what are the parameters goin with
>
>
> private String dbURL = "jdbc:odbc:jsp";
> private String dbDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
> private Connection dbCon;
>
>
> mysql is on c:\mysql
> apache on c:\apache
>
>
> and i use winNT for development..
> thx for any help.. i am struggeling.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html