Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
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
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT DBF
DBF Update
Oscar San Martin
2010-10-08 13:57:56.0
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.0
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.0
>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.0
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.0
>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.0
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.0
>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
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap