error when connecting !!!
What is the problem with this simple code.......
plz any one...
import java.sql.*;
public class QueryApp
{
public static void main(String a[])
{
ResultSet result;
try
{
Class.forName("sum.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:MyDataSource","scott","tiger");
Statement stat=con.createStatement();
result=stat.excecuteQuery("select * from login");
while (result.next())
{
System.out.println(result.getString(1));
}
}
catch(Exception e)
{
System.out.println("Couldnot execute the query");
}
}
}
- Compiler Output
QueryApp.java:15: cannot resolve symbol
symbol : method excecuteQuery (java.lang.String)
location: interface java.sql.Statement
result=stat.excecuteQuery("select * from login");
^
1 error

