Hi Luc

Here is the common syntax, that is used as the connection string through
JDBC-ODBC Driver.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:odbc:TestDSN";
Coonection con = DriverManager.getConnection(url,"username","password");

Before connecting, make sure you intslled the ODBC Driver and configured the
DSN 'TestDSN' created in the ODBC DSN Administartor. Based on your error
below, it looks you have the valid DSN, but you didn't supply the UID and
PWD in the connection string.

Thank you
Venu Anuganti

----- Original Message -----
From: "Luc Lalancette" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 3:02 PM
Subject: java.sql.SQLException: [TCX][MyODBC] Access denied for user...
(Using password: No) message


I am starting using mysql and I made a java SimpleQuery servlet that is
suppose to retreive one row from the database. However, when I try to
connect I get that message from the Subject. I know I'm suppose to pass the
password but can't seem to find a way of doing it. I was wondering if the
problem was with those two lines or if it was in the tdx mysql driver
default configuration in the ODBC.

Class c = Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
dbConn = DriverManager.getConnection("jdbc:odbc:TestDSN;");

I would appreciate if someone could help me to get my connection going.
Thank you very much
Luc Lalancette



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to