Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.258
  HXTT Cobol 5.0.257
  HXTT DBF 7.1.259
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel 6.1.261
  HXTT Json 1.0.229
  HXTT Paradox 7.1.257
  HXTT PDF 2.0.257
  HXTT Text(CSV) 7.1.257
  HXTT Word 1.1.257
  HXTT XML 4.0.258
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 Indexes access from SQL
M Docherty
2007-07-05 09:07:10
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
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
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
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
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
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
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
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
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
>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
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap