I want to run the following code .
package com.wli.connector.start;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import com.orientechnologies.orient.jdbc.OrientJdbcConnection;
public class startMain
{
public static void main(String[] args)
{
Properties info = new Properties();
String user = "root";
String password =
"488E6FB5BFDD6D01593731FC542A7AD24519A2AC2EEBD215408DF83C19EC719C";
info.put("user", user);
info.put("password", password);
try
{
Class.forName("com.orientechnologies.orient.jdbc.OrientJdbcDriver");
Connection connection = (OrientJdbcConnection)
DriverManager.getConnection("jdbc:orient:remote:localhost/test", info);
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("select from
user");
resultSet.next();
String vertexClass = resultSet.getString("@class");
String rid = resultSet.getString("@rid");
String first_name = resultSet.getString("first_name");
String last_name = resultSet.getString("last_name");
System.out.println("Vertex class name :- " + vertexClass);
System.out.println("RId of the Record :- " + rid);
System.out.println("First name of user :- " + first_name);
System.out.println("Last name of user :- " + last_name);
resultSet.close();
statement.close();
}
catch (SQLException e)
{
e.printStackTrace();
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
}
--
---
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.