I am converting existing Clipper code from free tables to data dictionary. I can read and write to tables but I can't create an index.
Here is the code :
connSaisie := DacSession():new(GetSsoConnection(1))
connSaisie:SetDefault()
DbeInfo( COMPONENT_DATA, ADSDBE_RIGHTS_MODE, ADSDBE_CHECKRIGHTS )
DbeInfo( COMPONENT_DATA, ADSDBE_LOCK_MODE, ADSDBE_PROPRIETARY_LOCKING )
DbeInfo( COMPONENT_DATA , ADSDBE_TBL_MODE, ADSDBE_CDX )
DbeInfo( COMPONENT_ORDER, ADSDBE_TBL_MODE, ADSDBE_CDX )
DBUSEAREA (.F., , "Nomencla", connSaisie, .F., .F.)
cTag:="SEBTAG"
SELECT Nomencla
Index on Code_nomen + Padl(Alltrim(Nom_champ1), 5, "0") +;
Padl(Alltrim(Nom_champ2), 4, "0") +;
Padl(Alltrim(Nom_champ3), 3, "0") TAG (cTag)
Set Order to TAG (cTag)
The (GetSsoConnection(1))
syntax takes care of retrieving the proper connection string.
The problem is that the index is created but in the executable directory instead of the database or temp folder defined for the data dictionary.
I am looking forward to any help or pointers and am more than willing to provide a sql script to create a sample table to reproduce the problem.
Thanks !