Wei Dai

Ranch Hand
+ Follow
since Jun 22, 2005
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Wei Dai

>CS.OUT_TIME between ? and ? and ...
Try (CS.OUT_TIME between ? and ?) and ... May your sql syntax is too complicated to be understood by MS Access.
>java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver"
Try oracle.jdbc.driver.OracleDriver
>Then it states that in the root of my project I can make an extra folder,
I guess that your teacher wish you to create a directory manually. Of couse you can use java.io.File.mkdir method also.
>I ran into the "No suitable driver found" error message
You should use
try{
Class.forName("org.postgresql.Driver").newInstance();
}catch(Exception e){
System.err.println(e);
}
in public Login()

>I'm making use of Type-1 Driver.
You cann't use sun jdbc-odbc bridge driver to connect MS Access database remotely.

>Should the Type-4 Driver support the remote connectivity?
HXTT Access(http://www.hxtt.com/access.html), a commercial type 4 driver for MS Access, supports it.
You should add one line to check the latest insert rows too.

removePerson = connection.prepareStatement(
"DELETE FROM Patient where PatientId=? and FirstName=? and LastName=? and Address=? and PhoneNumber?" );

Betl Gokr wrote:



It should be "insert into employee values (?,?)"
You should provide more detailed information about your exception.
You needn't to know more about Derby API, and you need only to use JDBC standard API to develope application
1. java.io.File copy blank mdb file

2. free Java Library for MS Access at http://jackcess.sourceforge.net/
Database.create(new File("new.mdb"));
3. commercial JDBC driver for MS Access at http://www.hxtt.com/access.html
sql: create database newfile;

> ps.executeUpdate();

int updatedCount=ps.executeUpdate();
System.out.println(updatedCount); //should print 0, then you should check your where clause.
Connection con = DriverManager.getConnection(url,properties);
DatabaseMetaData dbmd = con.getMetaData();
ResultSet rs=dbmd.getTables(null, null, null, new String[] { "TABLE" });