Home » RDBMS Server » Server Administration » No suitable Driver
No suitable Driver [message #369972] Tue, 21 November 2000 04:51
saravanan
Messages: 70
Registered: October 2000
Member
hi
I am using JSQL code to connect to database.
The sample code is as follows..

/**
import java.sql.SQLException ;
import oracle.sqlj.runtime.Oracle;

// iterator for the select

#sql iterator MyIter (String ITEM_NAME);

class TestInstallSQLJ
{
//Main method
public static void main (String args[[]])
{
try {
/* if you're using a non-Oracle JDBC Driver, add a call here to
DriverManager.registerDriver() to register your Driver
*/

// set the default connection to the URL, user, and password
// specified in your connect.properties file
Oracle.connect(TestInstallSQLJ.class, "connect.properties");

TestInstallSQLJ ti = new TestInstallSQLJ();
ti.runExample();
} catch (SQLException e) {
System.err.println("Error running the example: " + e);
}

} //End of method main

//Method that runs the example
void runExample() throws SQLException
{
//Issue SQL command to clear the SALES table
#sql { DELETE FROM SALES };
#sql { INSERT INTO SALES(ITEM_NAME) VALUES ('Hello, SQLJ!')};

MyIter iter;
#sql iter = { SELECT ITEM_NAME FROM SALES };

while (iter.next()) {
System.out.println(iter.ITEM_NAME());
}
}
}***/

In the connect.properties file I am setting
URL, User, Password correctly.. but I don't know why
the exception is raising!!! Any help please!!!
Previous Topic: Cursor when not found.
Next Topic: Object View Statement
Goto Forum:
  


Current Time: Sat May 04 09:28:19 CDT 2024