HXTT DBF Driver |
Colin Munford |
2007-04-25 06:15:38 |
We are utilising your driver to access DBF files created using Codebase client server and IBM Rational Software Architect version 7 and have encountered the following issues/queries.
PRB#1:
It is possible to setup a database connection with IBM Rational Software Architect version 7 however it does not show the tables and fields (schema) etc. We have also tried the Netbeans IDE and this does display the tables and fields correctly. How do we setup the driver so that RSA will show tables, fields etc ?
PRB#2:
Our tables are in Codebase DBF format and use .MDX index files.
After running SQL to delete records other applications can still see the deleted records.
How do we ensure that the .MDX index is updated correctly when we delete records ?
PRB#3:
Running an Insert Query to Insert 3 new records to a table can be very slow to execute. The table has less than 20 records.
To access a single table on local drive takes 1 to 6 seconds to complete
To access a mapped network drive takes 30 to 60 seconds to complete
Performing a Select Search query on the same table takes 0 seconds.
|
Re:HXTT DBF Driver |
HXTT Support |
2007-05-03 03:34:05 |
>Our tables are in Codebase DBF format and use .MDX index files.
>After running SQL to delete records other applications can still see the deleted
> records.
>How do we ensure that the .MDX index is updated correctly when we deleterecords?
Xbase likes to mark all deleted records, but doesn't remove it from table or index file. DeletesAreVisible connection property: Indicates whether DBF's resultSet includes deleted records. DBF doesn't index all deleted records except for setting DeletesAreVisible connection property to true. Default value: false
>Running an Insert Query to Insert 3 new records to a table can be very slow to
> execute. The table has less than 20 records.
What's your JDBC url? What's your sql?
>To access a single table on local drive takes 1 to 6 seconds to complete
>To access a mapped network drive takes 30 to 60 seconds to complete
>Performing a Select Search query on the same table takes 0 seconds.
Try to disable Opportunistic Locking. It's described at http://support.microsoft.com/support/kb/articles/q129/2/02.asp and http://support.microsoft.com/support/kb/articles/q296/2/64.asp . You can try Oplocks.reg and Oplocks server.reg at http://www.phoneslips.com/nav.htm .
|
Re:Re:HXTT DBF Driver |
Colin Munford |
2007-05-03 07:41:50 |
Thanks for the response.
We have tried using the DeletesAreVisible option but the record is still visible when we access the table using a third party application (TASPRO6) which relies on the MDX indexes.
The following is an extract of our code.
private static String DBF_CONNECTION = "jdbc:dbf:/o:/tas6";
private static String JDBC_DRIVER_CLASS = "com.hxtt.sql.dbf.DBFDriver";
public static void testDAODelete() {
Integer lSearchID;
lSearchID = 999;
Connection connection = null;
try {
Class.forName(JDBC_DRIVER_CLASS).newInstance();
Properties props=new Properties();
props.setProperty("DeletesAreVisible","true");
props.setProperty("Default Index Suffix","MDX");
connection = DriverManager.getConnection(DBF_CONNECTION,props);
connection.setAutoCommit(true);
Tst184Dao tst184Dao = new Tst184Dao();
boolean fOk;
fOk = tst184Dao.deleteEntity(connection, lSearchID);
System.out.println("Done:" + fOk);
} catch (SQLException unexpected) {
System.out.println(unexpected.getMessage());
} catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
} finally {
if (connection != null) {
try {
connection.close();
} catch (SQLException unexpected) {
// ignored
}
}
}
}
|
Re:Re:HXTT DBF Driver |
HXTT Support |
2007-05-03 08:02:30 |
>It is possible to setup a database connection with IBM Rational Software
>Architect version 7 however it does not show the tables and fields (schema) etc.
>We have also tried the Netbeans IDE and this does display the tables and fields >correctly. How do we setup the driver so that RSA will show tables, fields etc ?
According to our test experience on some JDBC browsers, for instance, DBVisualizer, iSQL-Viewer, AquaDataStudio, Sunopsis, MySQL Migration Toolkit, SQuirreL SQL Client, and DbEdit Database Utilites for Eclipse Platform, IBM Rational Software Architect version 7 should do a different process on java.sql.DatabaseMeta metod, so that it hasn't seen tables.
|
Re:Re:Re:Re:HXTT DBF Driver |
HXTT Support |
2007-05-03 08:10:48 |
>We have tried using the DeletesAreVisible option but the record is still visible
> when we access the table using a third party application (TASPRO6) which relies
> on the MDX indexes.
It's normal, because you can use java.sql.ResultSet.rowDeleted to know whether it's a deleted row.
You can try the followling code:
First, masked "props.setProperty("DeletesAreVisible","true");" since you doesn't wish your TASPRO6 to see those deleted rows.
Secondly, run once "reindex all on yourTable" so that HXTT DBF won't index all deleted rows.
Thirdly, now your TASPRO6 won't see deleted rows if it use indeedly index to query data. If not, TASPRO6 can see deleted rows still.
If you wish to remove your deleted rows permanently, run once "pack table yourTable" then all deleted rows will disappear.
|
Re:Re:Re:Re:Re:HXTT DBF Driver |
colin munford |
2007-06-01 03:20:36 |
Thanks for the response.
We have now tried your solution "reindex all on yourTable" however it still does not appear to automatically update the MDX indexes when we subsequently insert and delete. We will be using the driver in a production environment so it would not be possible to reindex after each Insert,update and delete operation. We have also tried using the CGP file as per your faq without success.
Are we doing something wrong or is this a limitation of HXTT using DBase MDX format. ?
If the ability to automatically update the MDX index on update,insert,delete is not currently available is it possible this might be available as a future option/custom option ?.
|
Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
HXTT Support |
2007-06-01 03:26:28 |
>it still does not appear to automatically update the MDX indexes when we
>subsequently insert and delete.
But HXTT DBF should update automatically your MDX index files. What're your dbf file name, and mdx file names?
|
Re:Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
colin munford |
2007-06-01 03:48:41 |
The fault is shown on several of our DBF files.
A typical filename is ICONT.DBF,ICONT.mdx
The files are held on an external mapped drive.
I can provide sample files and code if you can supply an email address if neccesary.
|
Re:Re:Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
HXTT Support |
2007-06-01 03:59:22 |
What's your jdbc url? You can zip it and email to webmaster@hxtt.com.
|
Re:Re:Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
colin munford |
2007-06-14 23:46:51 |
I did send the samples files via email to your address webmaster@hxtt.com on 04/06/2007 09:25 however to date I have not recieved any response. Could you confirm that you did recieve the files and are actively investigating the issue.
|
Re:Re:Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
HXTT Support |
2007-06-15 01:02:48 |
Checked. We have replied your email at Jun 4th 2007. I pasted the reply below:
Passed test with your sample. HXTT DBF update automatically your mdx file. Your issue should be:
1st, your TAS6 application is running.
2nd, HXTT DBF insert some news rows.
3rd, your TAS6 failed to see those new rows.
If my guess is correct, you should use the following solution:
You should use lockTyp connection property. For instance, try to change your
private static String DBF_CONNECTION = "jdbc:dbf:/o:/tas6";
into
private static String DBF_CONNECTION = "jdbc:dbf:/o:/tas6?lockType=FOXPRO";
That's all. You neen't to "REINDEX ..." any more.
|
Re:HXTT DBF Driver |
colin munford |
2007-07-05 01:35:07 |
Thanks for the response.
We tried the connection string you supplied
private static String DBF_CONNECTION = "jdbc:dbf:/o:/tas6?lockType=FOXPRO";
The MDX is still not updated.
We have also tried
lockType=DBASEIV";
lockType=DBASE4BDE";
The MDX is still not updated.
We have also tried setting via props instead of url.
e.g.
Properties props = new Properties();
props.setProperty("lockType", "FOXPRO");
Class.forName(JDBC_DRIVER_CLASS).newInstance();
connection = DriverManager.getConnection(DBF_CONNECTION,props);
The MDX is still not updated.
Any ideas ?
Regards
Colin Munford
|
Re:Re:Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
HXTT Support |
2007-07-05 01:51:11 |
Maybe its' a Windows security limitation. Now please coopy tas6 into c:/, then change that url to "jdbc:dbf:/c:/tas6?lockType=FOXPRO"; ,then to see whether its MDX will be updated.
|
Re:HXTT DBF Driver |
colin munford |
2007-07-05 05:54:57 |
We tried your sugestion Re copy DBF and MDX files to C but the MDX still does not update.
We have also tried DBase Plus and that is also wrong until we reindex the MDX.
Incidently if we rename the MDX file then run the update no error is reported and the DBF file is updated correctly.
Is it possible we have an old version of DBF_JDBC30.jar ?.
Ours is 990,700 bytes and is dated 16 February 2007, 14:46:22
When you tested our sample code/files how did you confirm the MDX had been updated ?
Did the file date/time change ?
Do you have any other suggestions ?
Regards
Colin Munford
|
Re:Re:Re:Re:Re:Re:Re:Re:HXTT DBF Driver |
HXTT Support |
2007-07-05 06:24:29 |
>Ours is 990,700 bytes and is dated 16 February 2007, 14:46:22
Yeah. Please download the latest package.
>Did the file date/time change ?
Yeah.
|