ADS in a mixed environment

This forum is for general support of Xbase++
Post Reply
Message
Author
User avatar
Tim K
Posts: 51
Joined: Thu Jun 03, 2010 3:55 pm

ADS in a mixed environment

#1 Post by Tim K »

I am migrating an enterprise system to ADS 11.X from FOXCDX. I would like to test a few users so that I don't have to do a "Big Bang" transition. I am operating under the assumption, attested by Roger, that ADS works with only indexes generated by ADS, and that the FOXCDX engine reads them fine but not the reverse. So, I have been creating new indexes with ADS at night. All the FOXCDX clients work fine and the ADS clients test fine to begin with, but sometime during the day an index on the most commonly used database suddenly acts as if it were created by FOXCDX. The chances of it having been recreated by a FOXCDX client are almost nil since it is opened and left open by several users. So my ADS testing clients stop being able to seek on that database, yet all the FOXCDX clients continue to be fine.
My questions are:
1. Is there a known "corruption" that causes an ADS index to suddenly behave as if it were created by the FOXCDX dbe?
2. Is a mixed environment problematic and to be avoided?

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: ADS in a mixed environment

#2 Post by unixkd »

Hi

The greatest challenge of ADS Indexes is the COLLATION sequence. The ADS server and the client machine must have the same LANGUAGE setting e.g ANSI USA. I do not know if this is mandatory for FOXCDX.

Are your tables bound to data dictionary ?

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: ADS in a mixed environment

#3 Post by Cliff Wiernik »

These are our settings. We were on ADS with clipper and switched to ADS with xbase++ - operated concurrently for years. You would likely have to use COMPATIBLE LOCKING, which is not the default. No experience with the FOXCDX,

SET COLLATION TO AMERICAN
SET DATE TO AMERICAN

SET OPTIMIZE OFF
SET RUSHMORE OFF
SET SMARTFILTER OFF

dbeSetDefault('ADSDBE')
DbeInfo( COMPONENT_DATA, ADSDBE_MEMOBLOCKSIZE, 64 )
DbeInfo( COMPONENT_DATA, ADSDBE_TBL_MODE, ADSDBE_CDX )
DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE, ADSDBE_CDX )
DbeInfo( COMPONENT_DATA, ADSDBE_LOCK_MODE, ADSDBE_PROPRIETARY_LOCKING )

Did you look at some of these settings from the Xbase++ help file.

CDXDBE_MODE

The CDX DatabaseEngine is designed to be 100% Visual FoxPro compatible. Concurrent usage of CDX files created and maintained by Xbase++ and Visual FoxPro is guaranteed. However a derivation of the Visual FoxPro CDX index format is also used by various Clipper RDDs such as Comix or Six. Using the CDXDBE_MODE constant the CDX DatabaseEngine can be configured to behave excatly as the Comix or DBFCDX RDD. This way concurrent usage of new Xbase++ applications and old Clipper applications in a network is guaranteed.

The following table lists all possible defines to control compatiblity of the CDX DatabaseEngine:

Constants for DbeInfo(COMPONENT_ORDER,CDXDBE_MODE,)

Constant Description

CDXDBE_VFOXPRO Visual FoxPro 5.x and higher

CDXDBE_COMIX Comix for Clipper RDD

CDXDBE_SIX Six for Clipper RDD

CDXDBE_FOXPRO2X FoxPro 2.x compatiblity

*) ro=READONLY , a=ASSIGNABLE

CDXDBE_VFOXPRO
Using the constant CDXDBE_VFOXPRO the CDX DatabaseEngine operates in a Visual FoxPro compatiblity mode. Concurrent usage of CDX files between Xbase++ and Visual FoxPro in a network environment is guaranteed. A specific feature of the Visual FoxPro mode of operation is the ability of the CDX DatabaseEngine to compress keys. Compression does reduce the size of the index file and hence increases performance. This mode should be the preferred mode when creating new applications.

Collation tables are case insensitive and follow the collating rules of Visual FoxPro. The collation table itself is stored with each tag of the CDX file. This makes the collation table usage by the CDX DatabaseEngine completely independent of collation table specific runtime settings. Furthermore, by storing each collation table with its tag, the CDX DatabaseEngine enables different collations per table.
CDXDBE_COMIX
This constant used at DbeInfo(), the CDX DatabaseEngine operates in Comix mode. This mode is guaranteed to be Clipper 5.3 and Comix RDD compatible. Keys are not compressed in this CDX file format, leading to a typically larger file size compared to the Visual FoxPro mode. Additionally, original Clipper collation tables are used. However this CDX file format will not store collation tables within the CDX file. Collation table management depends entirely on the Xbase++ runtime settings, such as it was the case with Clipper and Comix.

CDXDBE_SIX
Reserved for future use, currently identical to CDXDBE_COMIX.
CDXDBE_FOXPRO2X
Reserved for future use, currently identical to CDXDBE_COMIX.

Note: If CDX files are opened using OrdListAdd(), DbSetIndex() or SET INDEX TO the specific mode of operation (Visual FoxPro, Comix or Six) is automatically detected. If the index file opened is a FoxPro 2.x compatible IDX index file the CDX DatabaseEngine automatically detects this and switches to IDX compatibility mode. This automatic detection overwrittes possible CDXDBE_MODE settings. However if CDX files are created by Xbase++, CDXDBE_MODE determines the physical file format on disk.

User avatar
Tim K
Posts: 51
Joined: Thu Jun 03, 2010 3:55 pm

Re: ADS in a mixed environment

#4 Post by Tim K »

I have run DBFCDX when I was running XBASE++ and Clipper concurrently. ADS won't read DBT memos so I've converted to FOXCDX. I don't have data dictionaries. I have the SET COLLATION TO AMERICAN in my ADS app but not the FOX versions, so I'll try that. Thanks.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: ADS in a mixed environment

#5 Post by Cliff Wiernik »

I also don't know if the 2.x compatibility might be useful for you.

Post Reply