import java.sql.*;
class TestConnection
{
public static void main(String args[])
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:ram","myuser","myuser");
Statement st = con.createStatement();
st.executeUpdate("insert into student values( &stno, &sname, &course, &fees); ");
System.out.println("1 row Inserted");
con.close();
}
catch(Exception P)
{
P.printStackTrace();
}
}
}
i have already created table, and i want to enter the input from keyboard, but i am getting the following error please help me.......
java.sql.SQLException: [Oracle][ODBC][Ora]ORA-01008: not all variables bound
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
at TestConnection.main(TestConnection.java:13)