Hi, i am evaluating the hxttf driver.
I do
1) set the connection auto commit to false
2) insert into a dbf
3) do a roolbak in the connecion object
The row inserted in the step 2 is visible in the dbf. What is my mistake?
Regards
Santiago
|
>The row inserted in the step 2 is visible in the dbf. What is my mistake?
You are using Read uncommitted. You can set Isolation Level to Read committed.
|
Hi, thanks for the answer.
I set the isolation level, but still i can see the record in the dbf file.
I can see that the problem is the line
Connection con = DriverManager.getConnectio("jdbc:dbf:/c:/tablas/tabla1",prop);
if i call the DriverManager in this way
Connection con = DriverManager.getConnectio("jdbc:dbf:/c:/tablas/tabla1");
everything works fine.
This is my code:
Properties prop=new Properties();
prop.setProperty( "lockType", "CLIPPER" );
prop.setProperty("versionNumber", "03");
prop.setProperty("Default Index Suffix","NTX");
Connection con = DriverManager.getConnection("jdbc:dbf:/c:/tablas/tabla1",prop);
con.setAutoCommit(false);
con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
try {
Statement stmt = con.createStatement();
stmt.executeUpdate("insert into funcio00 (funcod,funapedos) values
('19123','atom1')");
throw new SQLException();
} catch (SQLException ex) {
con.rollback();
con.close();
ex.printStackTrace();
}
|
>prop.setProperty( "lockType", "CLIPPER" );
If you haven't Clipper applications do concurrent access, you can remove that line. Because on Xbase compatible mode, transaction will be disabled automatically.
|
Ok, but i have clipper applications doing concurrent access...
Is possible use the transaction capabilities in this environment?
|
>Ok, but i have clipper applications doing concurrent access...
>Is possible use the transaction capabilities in this environment?
If you need, we can provide Read uncommitted transaction for Xbase compatible mode.
|
Hi i am still evaluating the driver.
I got an exception when this query is executed
String query = "select FUNCOD,FUNAPEUNO,FUNAPEDOS,FUNNOMUN,FUNNOMDOS from funcio00 ";
......
stmt.setMaxRows(25);
ResultSet rs = stmt.executeQuery(query);
java.sql.SQLException: Syntax error: Stopped parse at null
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.a.b.a(Unknown Source)
at com.hxtt.a.b.a(Unknown Source)
at com.hxtt.a.b.f(Unknown Source)
at com.hxtt.sql.bm.n(Unknown Source)
at com.hxtt.sql.ag.if(Unknown Source)
at com.hxtt.sql.ag.a(Unknown Source)
at com.hxtt.sql.ag.executeQuery(Unknown Source)
|
Sorry thelast problem(syntax error) is solved .
Yes i need Read uncommitted transaction for Xbase compatible mode
Could you sent me the cost for that? I need this compatible mode and the driver license for one server.
|
>Yes i need Read uncommitted transaction for Xbase compatible mode
>Could you sent me the cost for that?
It have enabled before one week. No fee. Please continue your evaluation test.
|