Hi Luca sorry to say that was not working

*public* *static* *void* main(String[] args) {

OrientGraphFactory factory = *new* OrientGraphFactory(

"remote:localhost/Test", "root", "user");

OrientGraph graph = factory.getTx();

*try* {

OClass F = graph.createVertexType("table1", "V");

F.createProperty("nodeno", OType.*INTEGER*);

F.createProperty("name", OType.*INTEGER*);

FileReader fr = *new* FileReader(

"C:/Users/ORIENTDBDOCS/myfile.txt");

BufferedReader br = *new* BufferedReader(fr);

String s;

*while* ((s = br.readLine()) != *null*) {

String query = String.*format*(s);

graph.command(*new* OCommandSQL(query)).execute();

}

} *catch* (Exception e) {

e.printStackTrace();

} *finally* {

graph.commit();

graph.shutdown();

}
//
I have tried while creating table and after table created both are not 
working

but if I am trying to insert like this 

String query = "INSERT INTO table (nodeno,name) VALUES (2010,21)";

graph.command(*new* OCommandSQL(query)).execute();
  
working good
:

> Hi Eswar,
>
> is the error the same you had got previously ?
>
> In my posted code I added '//added instruction' comment without closing 
> the double slash and a part of the code has been commented, but I don't 
> know if this could be the reason...
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to