Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
error in JDBC Connection(Sorry there was TYPO ERROR in my previous mail)

error in JDBC Connection(Sorry there was TYPO ERROR in my previous mail)

2006-06-03       - By VenuGopal Papasani

 Back
Hi all,
   I have got a problem with the jdbc connection while connecting to
Mysql.I have written an XML file.The following is the code for giving the
database connection
<DATABASE type="String">
         <driver>com.mysql.jdbc.Driver Source code of com.mysql.jdbc.Driver<\driver>
         <database>
              <location>jdbc:mysql:\\localhost\test<\location>
               <user>root<\user>
                <password>root<\password>
          <\database>

<\DATABASE>


   The database is accesed using the java code.Now the problem is exception
is arised while taking the user.
Connection con=DriverManager.getConnection(db,user,password) where db,user
and password are captured in java code

The db is being taken as the jdbc:mysql:\\localhost\test
   user is taken also the db value that is jdbc:mysql:\\localhost\test
  and password is shown as root

    Is there any problem with my XML code.Can anyone help me where the
actual problem is.When i give db,user and password as constant strings in
the code it works well and also these above values are displayed when i
tried to display in the java code.I think main problem lies in the XML code.


   I Don`t know whether this is the right place to place my query or
not(coz it deals more about java):I am sorry if i misplaced it

Thanks and regards
venu