1 Reply Latest reply on Jul 13, 2006 1:33 AM by paata lominadze

    Insert into Orace TimesTen In Memory DataBase

    paata lominadze Master

      i have created table in oracle timesten

      [
      CREATE TABLE "PAATA"."STUDENT" (
       "ID" INTEGER NOT NULL,
       "NAME" VARCHAR(200),
       "SURNAME" VARCHAR(200),
       "AGE" INTEGER,
       "GROUPID" INTEGER
      ) ;
      /code]
      
      then i tried to insert from java
      
      
      import java.sql.DriverManager;
      import java.sql.Connection;
      import java.sql.*;
      
      public class TestTimesTen {
       public static void main(String[] args) {
       try {
       Class.forName("com.timesten.jdbc.TimesTenDriver");
       String URL = "jdbc:timesten:DSName";
       Connection _Connection = DriverManager.getConnection(URL);
       Statement stmt = _Connection.createStatement();
       int res1 = stmt.executeUpdate("insert into PAATA.STUDENT (ID,NAME,SURNAME,AGE,GROUPID) values (1,'asdasd','asdasdasd',22,2)");
      
       System.out.println("asdasdasdasd");
       }
       catch (SQLException ex) {
       ex.printStackTrace();
       }
       catch (ClassNotFoundException ex) {
       ex.printStackTrace();
       }
       }
      }
      
      
      
      
      
      but i get an error :( i don't know why :(
      
      
      java.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC Driver][TimesTen]TT2206: Table ADMINISTRATOR.STUDENT not found -- file "comp.c", lineno 2031, procedure "sbCompCacheTbl()"
       at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6327)
       at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6460)
       at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6425)
       at com.timesten.jdbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3934)
       at com.timesten.jdbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:420)
       at com.timesten.jdbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:328)
       at untitled3.Untitled1.main(Untitled1.java:16)
      
      
      
      
      can anybody help me ?
      thanks....
      


        • 1. Re: Insert into Orace TimesTen In Memory DataBase
          paata lominadze Master

          sorry when i was wrote

          insert into PAATA.STUDENT (ID,NAME,SURNAME,AGE,GROUPID) values (1,'asdasd','asdasdasd',22,2)

          i get an error


          java.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC Driver][TimesTen]TT2206: Table PAATA.STUDENT not found -- file "comp.c", lineno 2031, procedure "sbCompCacheTbl()"
          at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6327)
          at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6460)
          at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6425)
          at com.timesten.jdbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3934)
          at com.timesten.jdbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:420)
          at com.timesten.jdbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:360)
          at untitled3.Untitled1.main(Untitled1.java:26)



          and if i remove shemaname PAATA from insert

          insert into STUDENT (ID,NAME,SURNAME,AGE,GROUPID) values (1,'asdasd','asdasdasd',22,2)

          i get an error like this :



          java.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC Driver][TimesTen]TT2206: Table ADMINISTRATOR.STUDENT not found -- file "comp.c", lineno 2031, procedure "sbCompCacheTbl()"
           at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6327)
           at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6460)
           at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6425)
           at com.timesten.jdbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3934)
           at com.timesten.jdbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:420)
           at com.timesten.jdbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:360)
           at untitled3.Untitled1.main(Untitled1.java:26)