Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  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 DBF
DBF Update
Oscar San Martin
2010-10-08 13:57:56
Hi, my environment : SCO UNIX, Fox Plus on server, Ubuntu on client. DBF driver 3.0 (last release).

Sometimes SELECT SQL don't work, and I need to insert ALLTRIM function in order to find records. example :

SELECT * FROM movimien
WHERE ALLTRIM(ndoc) = '" + numPresupuesto + "' AND
ALLTRIM( valepreven ) = '' AND
(preventa = 'S' OR trasladosn = 'T' ) AND
item <> '999999999' AND
fmov = '" + fact + "' AND
(ALLTRIM(tpref) = '7' OR ALLTRIM(tpref) = '8' OR ALLTRIM(tpref) = '9')

In select sentence the delay is acceptable, but when I try to update this table with the same search criteria, delay is unacceptable....

UPDATE movimien SET
valepreven = ndoc,
refe = '" + numFolio + "',
refe1 = '" + numFolio + "',
clave = '" + tipoDocto + " " + numFolio + "2" + numFolio + "',
nlocal = " + Integer.parseInt( terminal )
WHERE alltrim(ndoc) = '" + numPresupuesto + "' AND
ALLTRIM(tpref) = '" + tipoDocto + "' AND
valepreven = '' AND
preventa = 'S'

additional data, in table "movimien" field "ndoc" is character (9), but if I select without ALLTRIM funcion, sometimes found and sometimes not. actually in the statement "SELECT" is not the problem, the problem is when I try to update the table with the same search criteria...

Client properties connection :

p.setProperty( "maxIdleTime", "1440" );
p.setProperty( "lockType", "FOXPRO4UNIX" );
p.setProperty( "lockTimeout", "90000" );


I appreciate your help,

Oscar




DBF Update
Oscar San Martin
2010-10-08 14:00:34
I forgot the other data, when UPDATE is running, All other clients will become very slow or hang....
Re:Re:DBF Update
HXTT Support
2010-10-08 17:34:48
>but if I select without ALLTRIM funcion, sometimes found and sometimes not.
Try to remove movimien.cdx file, or run once "reindex all on movimien" since your movimien.cdx mabye has some obsoleted index information.

>when UPDATE is running, All other clients will become very slow or hang....
I guess that issue should be resulted by index lock. You can try to remove your index file by run once "drop index all on movimien;"

Re:Re:Re:DBF Update
Oscar San Martin
2010-10-08 19:23:09
Ok, I ran "reindex all on movimien" (index files are IDX), and now I do not need ALLTRIM function in sql sentence....and I can SELECT and UPDATE without problem....

But why does this happen??, reindex all instruction was delayed 15 minutes...(movimien table have 380000 records )...
if the problem reoccurs I leave all customers outside while "reindex all" is running ???

Thanks.
Re:Re:Re:Re:DBF Update
HXTT Support
2010-10-08 19:34:39
>But why does this happen??
Because long long ago you haven't use lockType connection property so that your index file is obsoleted by concurrent modification.

>reindex all instruction was delayed 15 minutes...(movimien table have 380000 records )...
Maybe your table has many index. Maybe it wait a long time to acquire a table lock for reindex purpose.

>if the problem reoccurs I leave all customers outside while "reindex all"
>is running ???
After you used lockType connection property, your index file should not be obsoleted again.
Re:Re:Re:Re:Re:DBF Update
Oscar San Martin
2010-10-08 19:46:20
Finally, if reindex all on movimien is executed in Fox system on server..., this help me ??? or necessarily I need run reindex on java program with hxtt driver ??

Thanks.

Re:Re:Re:Re:Re:Re:DBF Update
HXTT Support
2010-10-08 19:59:20
>Finally, if reindex all on movimien is executed in Fox system on server...,
>this help me ??
You can run REINDEX in Fox system too. That operation is one-tme opeartion, and you needn't to run frequently.

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