Access driver - Insert failed |
Pascal |
2009-04-22 06:06:28 |
Dear support,
I'm evaluating your access jdbc driver on a windows2000/coldfusion MX 6.1/access 2003 database platform. I'm using your 3.0 version package.
Select queries work fine.
Insert queries always fail, even the simplyest.
INSERT INTO EMPL_Contacts ( Contact_Email, Adresse_Email, TelContact , NomContact, Pos_Contact ) VALUES( 0, 'Pascal.pincebourde@bms.com', '6128', 'Pascal', 1 )
I got this message "commit failed. For more information, please use SQLException.getNextException(). " and sqlstate is 40000 (rollback).
Any idea ?
|
Re:Access driver - Insert failed |
HXTT Support |
2009-04-22 17:29:49 |
You should meet primvary key collision. Try to remove your index or avoid to insert the same key value.
BTW, may you wish to use null value for Contact_Email, the sql is
INSERT INTO EMPL_Contacts ( Contact_Email, Adresse_Email, TelContact , NomContact, Pos_Contact ) VALUES( null, 'Pascal.pincebourde@bms.com', '6128', 'Pascal', 1 )
|
Re:Re:Access driver - Insert failed |
Pascal |
2009-04-23 00:43:27 |
Thank you for your quick reply.
I tryed with null value with same result.
The primary key is an automatic counter, it does not not appear in the request. By the way, i tryed the same request through your database admin v0.5 tools, and it was successfull. Do i have some extra stuff to configure regarding coldfusion data source ?
|
Re:Re:Re:Access driver - Insert failed |
HXTT Support |
2009-04-23 04:25:45 |
Try
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);
}
to see the detailed error message.
|
Re:Re:Re:Re:Access driver - Insert failed |
pascal |
2009-04-23 05:07:14 |
native error code is : 262144
I'm trying to implement your code in coldfusion
|
Re:Re:Re:Re:Re:Access driver - Insert failed |
pascal |
2009-04-23 06:27:58 |
i'm not able to call "getNextException" in coldfusion, i don't know how to proceed since i use and tags
I tryed with a simple table Test(tes_id number,test_txt text), no primary key, no index :
INSERT INTO test (test_id,test_txt) VALUES(1,'pascal')" fail .....
update requests works fine.
|
Re:Re:Re:Re:Re:Re:Access driver - Insert failed |
HXTT Support |
2009-04-23 06:36:55 |
Please send us your test .cfm file.
|
Re:Re:Re:Re:Re:Re:Re:Access driver - Insert failed |
pascal |
2009-04-23 07:13:28 |
INSERT INTO test (test_id,test_txt) VALUES(1,'pascal')";
|
Re:Re:Re:Re:Re:Re:Re:Re:Access driver - Insert failed |
HXTT Support |
2009-05-14 20:54:33 |
v3.2.062 fixed a cache bug, which failed to get correct values sometimes after data modification,since v3.1.0.11
|