
I compiling my jdbcodbc progrm. D:\Java\jdk1.6.0\bin>javac JdbcExample.java JdbcExample.java:12: cannot find symbol symbol : method ClassforName(java.lang.String) location: class JDBCExample ClassforName("sun.jdbc.odbc.JdbcOdbcDriver"); ^ I got this error.can any one tell me,why this error?

Hi Friend,
It seems that you haven't create dsn connection. So follow the following steps:
Open Data Sources (Start->Control Panel->Administrative Tool->Data Sources(ODBC)
Open User DSN tab
Select database name and Create the DSN name (e.g emp)
Click ok and restart your compiler.
Thanks

Hai friends, I found my mistake.i had add java.lang before the Clas.forName(sun.jdbc.odbc.JdbcOdbcDriver).my error has gone. thank u.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.