Results 1 to 2 of 2
  1. #1
    vitaly87 is offline Member
    Join Date
    Mar 2010
    Rep Power

    Default convert resultSet to Instances

    Hello all!
    I dont know how can i convert resultSet to Instances in java.
    I want to use the Weka(data mining) to run on my db.
    the code that i have is:
    Java Code:
     connect = DriverManager.getConnection("jdbc:derby:C:/Documents and Settings/vitaly/.netbeans-derby/simple", "demo", "demo");
            statement = connect.createStatement();
            resultSet = statement.executeQuery("SELECT * FROM");
    I am using netbeans.
    I need to get the code that can do this:
    Instances data=(Instances)resultSet

    I tried to write this :

    Java Code:
             InstanceQuery query = new InstanceQuery();
     query.setQuery("select * from");
     // if your data is sparse, then you can say so too
     // query.setSparseData(true);
     Instances data = query.retrieveInstances();
    but get erros
    Trying to add database driver (JDBC): RmiJdbc.RJDriver - Error, not in CLASSPATH?
    thanks for helping

  2. #2
    demonick is offline Member
    Join Date
    Dec 2010
    Rep Power


    Search on how to iterate ResultSet, I think this will solve the code part, also check if all .jar files needed are imported and added to classpath, and check location of DB.

Similar Threads

  1. Creating new instances of a Match over and over again
    By Che_Is_Alive in forum Advanced Java
    Replies: 2
    Last Post: 11-19-2009, 06:05 PM
  2. Problem with class instances
    By sdwinder in forum New To Java
    Replies: 7
    Last Post: 10-21-2009, 01:25 AM
  3. Build Instances problem
    By leapinlizard in forum New To Java
    Replies: 4
    Last Post: 04-21-2009, 10:17 AM
  4. Calling a method for all instances of an object
    By rattle in forum New To Java
    Replies: 4
    Last Post: 04-30-2008, 02:10 PM
  5. Naming object instances
    By oldgit in forum New To Java
    Replies: 9
    Last Post: 02-07-2008, 11:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts