Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.exception:help please

 
Anuj Anand
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error ..can somebody help me please....
caught java.sql.SQLException: [Microsoft][ODBC Access 97 ODBC driver Driver]General error Unable to open registry key 'DriverId'. at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at java.sql.SQLException.(SQLException.java:43) at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:3814) at
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means most probably there is a syntax error in the SQL statement. Please check once again.
regds
maha anna
 
Anuj Anand
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is failing at this statement
con = DriverManager.getConnection(connectionurl,props);
where connectionurl = jdbc dbc:MyAccessDataSource....i don't know why it's not working!!!
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably because MyAccessDataSource is not properly defined in ODBC.
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did it work before? If this is the first time you are trying, as Thomas said, we have to check if the ODBC DSN (Data Source Name) is defined properly or not. Which database /platform are you using?
regds
maha anna
 
Anuj Anand
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i am using for first time
1)Created an access file
2)Created a DAta Source : MyAccessDataSource in the settings of control panel .Attached the access file to it. This access file db1.mdb contains a table Employees having unique employee id .
That's it....Is there anything more to be done...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic