Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT ACCESS
Data lost on insert
John Moore
2006-11-16 07:38:16
I'm trying to do the simplest thing, an insert using the latest JDBC 3.0 jar. Below is what I have in my test class. What is happening is that the row is created in Access but it contains no data. Other tables are not showing this problem with inserts, and when I test using the Sun JDBC-ODBC bridge, the data is there in Access as it should be. I am quite mystified. I have tried to upload the database to your FTP server as previously instructed (called tables.mdb), but I am getting an error as the uplaod completes (can't write to the file). Maybe you do in fact have the file, in which case maybe you could test out the problem.

Class.forName("com.hxtt.sql.access.AccessDriver").newInstance();
String url = "jdbc:access:////windows_d/projects/rainbow-epos/tables.mdb";
java.sql.Connection c = DriverManager.getConnection(url, "", "");
c.setAutoCommit(false);
c.setReadOnly(false);
java.sql.Statement st = c.createStatement();
st.execute("DELETE FROM PLUStock");
st.execute("INSERT INTO PLUStock (PLUCode) VALUES ('123456')");
c.commit();
Re:Data lost on insert
HXTT Support
2006-11-17 02:55:44
Passed test with the following code. Because I haven't seen your upload file so that I used a simulative mdb files. I think that the key is your tables.mdb file. You can zip and upload your backup database and corrupted database into:
ftp site: ftp.hxtt.com
ftp user: anonymous@hxtt.com
ftp password: (empty)
login mode: normal (not anonymous)
ftp port:21
upload directory: incoming
transer mode: binary (not ASCII)
After upload, you can't see that upload file, but it has been upload.

You can choose to zip and email it to webmaster.hxtt@gmail.com too.



import java.sql.*;
import java.util.Properties;

public class testTrans8 {
public static void main(String argv[]) {
try {

Class.forName("com.hxtt.sql.access.AccessDriver").newInstance();

// String url = "jdbc:access:////windows_d/projects/rainbow-epos/tables.mdb";
String url = "jdbc:access:////mdbfiles/tables.mdb";

Properties props = new Properties();

java.sql.Connection c = DriverManager.getConnection(url, "", "");
c.setAutoCommit(false);
c.setReadOnly(false);
java.sql.Statement st = c.createStatement();
st.execute("DELETE FROM PLUStock");
st.execute("INSERT INTO PLUStock (PLUCode) VALUES ('123456')");
c.commit();

c.close();

}
catch (SQLException sqle) {
do {
System.out.println(sqle.getMessage());
System.out.println("Error Code:" + sqle.getErrorCode());
System.out.println("SQL State:" + sqle.getSQLState());
sqle.printStackTrace();
}
while ( (sqle = sqle.getNextException()) != null);
}
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}
Re:Data lost on insert
John Moore
2006-11-22 01:53:04
I have e-mailed the zipped mdb file to the address mentioned above.
Re:Re:Re:Data lost on insert
HXTT Support
2006-11-22 07:53:24
Thanks. Recurred and fixed a bug:
v2.0.041 fixed a bug for insert very long data into JET3 version database.
v2.0.041 supports fully ALTER TABLE sql.
v2.0.041 supports DROP INDEX sql.

You can download it after about 2 hours.
Re:Data lost on insert
John Moore
2006-11-22 08:03:14
I'll check it out. I'm impressed by the level of support here - let's hope I can dispense with the JDBC-ODBC bridge very soon!
Re:Data lost on insert
John Moore
2006-11-22 08:32:14
No, the bug is still there. Please try again with the tables.mdb.zip I just sent to webmaster.hxtt@gmail.com. No error is returned, and a row is inserted into PLUStock, but there is no data in the row (the column 'PLUCode' is empty, where it should contain '123456').
Re:Data lost on insert
John Moore
2006-11-22 08:38:36
Here's something helpful I just discovered: the problem does not occur if I convert the database to JET4. Unfortunately I am not able to do this for the real system, which has to work with JET3 databases.
Re:Re:Re:Re:Re:Re:Re:Data lost on insert
HXTT Support
2006-11-22 16:19:42
You download it at 08:16, but it's updated at 09:35:) Please redownload it:) Thanks for your valuable response:)
Re:Re:Re:Re:Re:Re:Re:Re:Data lost on insert
HXTT Support
2006-11-22 16:22:13
>Here's something helpful I just discovered: the problem does not occur if I
> convert the database to JET4. Unfortunately I am not able to do this for the
> real system, which has to work with JET3 databases.
Yeah. It's a fixed bug for insert very long data into JET3 version database sometimes.
Re:Data lost on insert
John Moore
2006-11-23 01:32:23
Looks like it's fixed, thanks. I'll let you know.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap