I am using SQL Server 2005. I am getting this error while connecting with sql server from java. Using SQL Server Authentication. Logina Table name=Registation
[microsoft][odbc sql server driver][sql server]invalid object name 'Registation'
Below is the connection code in java file in try-catch block.
public void Save()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection co=DriverManager.getConnection("jdbc:odbc:khem","sa","");
PreparedStatement stmt=co.prepareStatement("insert into Registation values(?,?,?,?,?,?,? )");
stmt.setString(1,t1.getText());
stmt.setString(2,t2.getText());
stmt.setString(3,ch.getSelectedItem());
stmt.setString(4,t4.getText());
stmt.setString(5,t5.getText());
stmt.setString(6,t6.getText());
stmt.setString(7,t7.getText());
stmt.executeUpdate();

JOptionPane.showMessageDialog(null,"value is Saved successfully");

}
catch(Exception ex1)
{
System.out.println("error found"+ex1);
}
}