can anyone send me a example of how does JDBC javaOBjEX works,
please include sample java program, JED SYSTEM MYACCOUNT. I have tried working on but get this error
java.sql.SQLException: direct SQL syntax error or access rule violation Compile
error: -1 File "First file specified in query " not found.
File SYSTEM , Record 'MYACCOUNT' Insert 16:54:08
Command->
0001 D
0002 C:\Madagascar\bnk\bnk.run
0003
0004
0005
0006
0007 /h{%Q`
0008
0009
0010
0011 -X "JEDIFILEPATH=D:\jbase4\home"
and dis is my java program
import java.sql.*;
import java.io.*;
public class JDBCTestJBase
{
public static void main (String args []) throws SQLException, IOException
{
Connection conn = null;
System.out.println ("Loading JDBC jBASE driver");
try
{
Class.forName ("com.jbase.jdbc.driver.JBaseJDBCDriver");
}
catch (ClassNotFoundException e)
{
System.out.println ("Could not load the driver. Is your classpath correct?");
e.printStackTrace ();
}
System.out.println ("Connecting to the local database");
try{
conn = DriverManager.getConnection("jdbc:jbasejo:thin:@localhost:3570:MYACCOUNT","bnk","shevid");
System.out.println("connextuon " + conn);
}
catch(Exception r)
{
System.out.println("error ah ithe");
}
try
{
Statement stmt = conn.createStatement();
System.out.println("statement" + stmt);
String s = "SELECT EB.CUS.NAME.1 FROM FBNK.CUSTOMER";
System.out.println(s);
ResultSet rset = stmt.executeQuery (s);
System.out.println("statement" + rset);
while (rset.next())
{
// Print the name out
String lastName = rset.getString(1);
String first = rset.getString("FIRST"); // case insensive, referencing alias first
System.out.println (lastName + ", " + first);
}
stmt.close();
conn.close();
}catch(SQLException se)
{
se.printStackTrace();
System.out.println("..........................");
String sErrorState = "Err Code: " + se.getErrorCode() + " SQL State: " + se.getSQLState() + " mesg: " + se.getMessage();
System.out.println(sErrorState);
System.out.println("..........................");
conn.close();
}
}
}
Please help