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 Indexes access from SQL
M Docherty
2007-07-05 09:07:10.0
Hi

I have Codebase (.DBF & .MDX files) and am trying to access them from Java using SQL.
I can read and write OK, BUT, the existing indexes are NOT being maintained.

I know this because I can delete the index file and run an update and it writes a record with NO run time errors. If it tried to maintain the Index it should have given an error, as it does not exist. It also does not create an index file.

So, How do I tell SQL that there is an index it MUST maintain?
Re:DBF Indexes access from SQL
HXTT Support
2007-07-05 17:27:25.0
At Index Questions, please read:
6. The ntx can't be updated when I update the DBF file.

You can add those MDX files into the relative CGP file.
Re:Re:DBF Indexes access from SQL
Mike Docherty
2007-07-06 00:56:38.0
Hi

Thanks for the answer "You can add those MDX files into the relative CGP file."

This is all very new to me, I do not know what a CGP file is.
I cant see one in the folder - I am using CodeBase (.DBF & .MDX files) not Clipper (.IDX files).
So, somehow, I have to generate a CGP file ?

How do I generate a CGP File ?
Re:Re:Re:DBF Indexes access from SQL
HXTT Support
2007-07-06 02:12:09.0
What's your table name, and MDX file name? CGP is a simple text file, and you can add that mDX file name into that CGP file.
Re:Re:Re:Re:DBF Indexes access from SQL
Mike Docherty
2007-07-06 04:46:21.0
Thanks for reply:

Table name: ITITLE.DBF
Index Name: ITITLE.mdx

Are you saying all I need is simple text .CGP file in same folder, called:
ITITLE.CGP
and in that text file all I need is the 2 lines (below):
ITITLE.DBF
ITITLE.mdx

and nothing else to in Java to say there is a .CGP file ?
and nothing else in Java like java.com.hxtt.sql.DBFIndex ?
Re:Re:Re:Re:Re:DBF Indexes access from SQL
HXTT Support
2007-07-06 05:23:23.0
Just one line:
ITITLE.mdx

BTW, what's your OS?
Re:Re:Re:Re:Re:Re:DBF Indexes access from SQL
Mike Docherty
2007-07-06 05:40:43.0
Microsoft Windows XP Professional
5.1.2600 Sevice Pack 2 Build 2600
Re:Re:Re:Re:Re:Re:Re:DBF Indexes access from SQL
HXTT Support
2007-07-06 06:43:44.0
It's strange. If both of ITITLE.DBF and ITITLE.mdx are at the same directory, HXTT DBF should open it automatically.
Re:Re:Re:Re:Re:Re:Re:Re:DBF Indexes access from SQL
Mike Docherty
2007-07-09 01:38:28.0
Hi

did a bit more testing and checking.
Yes, the indexes are being maintained now.
Probably because we are using now "lockType=DBASEIV" and not FOXPRO.

But, I can still delete the index file and no error is given when we access or update the data, even when a .CGP file exists.

I have a .DBF file: TST206.DBF
No .mdx file
and a .CGP file: TST206.CGP
containing 1 line:
TST206.mdx

I believe the data is being maintained, but the index cant becuse it isn't there.

I would expect some sort of OPEN error when I open a file with a given index and that index file does not exist.

Q Is there a way to produce some error if the index file does not exist?

Thanks
Re:Re:Re:Re:Re:Re:Re:Re:DBF Indexes access from SQL
HXTT Support
2007-07-10 08:12:51.0
>Probably because we are using now "lockType=DBASEIV" and not FOXPRO.
It should haven't relation with that lockType connection property.

>But, I can still delete the index file and no error is given when we access or
> update the data, even when a .CGP file exists.
Yeah. If it found that index file doesn't exist, it will ignore it.

>I would expect some sort of OPEN error when I open a file with a given index
> and that index file does not exist.
>Q Is there a way to produce some error if the index file does not exist?
It won't because index file isn't the necessary file for dbf database. In fact, you should use CREATE INDEX, REINDEX, and DROP INDEX, to maintain your index files. Manual or programmable CGP file is only for already existent index files.

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