>>
Just a follow up to the corrupted text indexes - we have been bitten again
by this bug.  I have never in my years of experience with R:Base had so
many index problems, until (it seems) that we began to use long text values
for keys (Text(36)) - perhaps R:Base is having trouble with these.  FWIW
the problem SEEMS to go away when I remove any FK constraints from the text
column(s).
<<

I have a example where  the problem happen also with PK.

Here is my table structure :

CREATE TABLE commande ( +
   numcde      TEXT (8)   NOT NULL ('Indiquer le N� de la commande'), +
   cdeclarant  TEXT (4)   NOT NULL ('Indiquer le code du d�clarant'), +
   adresse1    TEXT (35)  NOT NULL ('Indiquer le nom du partenaire'), +
   ....
   cmonnaie    TEXT (3)   , +
   ....
   cregdou     TEXT (5)   , +
   ...
   numdau      TEXT (6)   , +
   ...
   cetat       TEXT (1)   , +
   ....
   )

ALTER TABLE commande ADD PRIMARY KEY (numcde) +
   ('Cr�ation impossible : Code d�j� affect� � une autre op�ration', +
    'Suppression impossible : Ce code est r�f�renc� dans une autre table',
+
    'Modification impossible : Ce code est r�f�renc� dans une autre table')
ALTER TABLE commande ADD FOREIGN INDEX (cdeclarant) REFERENCES declarant +
   ('Cr�ation Interdite : Code non r�f�renc� dans la table des D�clarant',
+
    'Modification Interdite : Code non r�f�renc� dans la table des
D�clarant')
ALTER TABLE commande ADD FOREIGN INDEX (cregdou) REFERENCES regdou +
   ('Cr�ation Interdite : Code non r�f�renc� dans la table des R�gimes
douaniers', +
    'Modification Interdite : Code non r�f�renc� dans la table des R�gimes
douaniers') 
ALTER TABLE commande ADD FOREIGN INDEX (cmonnaie) REFERENCES monnaie +
   ('Cr�ation Interdite : Code non r�f�renc� dans la table des Monnaies', +
    'Modification Interdite : Code non r�f�renc� dans la table des
Monnaies') 
CREATE INDEX numdau ON commande (numdau ASC)
CREATE INDEX cetat ON commande (cetat ASC)


Here is the way I detect the problem :

-- vnbenr = real number of rows in the table (enforce sequential read) =
343
SELECT COUNT(*) INTO vnbenr FROM commande WHERE adresse1 IS NOT NULL

--Indexed read thru PK NUMCDE. vINT = 342
SELECT COUNT(DISTINCT numcde) INTO vINT FROM commande
IF vnbenr <> .vINT THEN
   GOTO DisplayError
ENDIF

--Indexed read thru FK CDECLARANT. vINT = 342
SELECT COUNT(cdeclarant) INTO vINT FROM commande
IF vnbenr <> .vINT THEN
   GOTO DisplayError
ENDIF

--Indexed read thru FK CMONNAIE. vINT = 342
SELECT COUNT(cmonnaie)INTO vINT FROM commande
IF vnbenr <> .vINT THEN
   GOTO DisplayError
ENDIF

--Indexed read thru INDEX CREGDOU. vINT = 343
SELECT COUNT(cregdou) INTO vINT FROM commande
IF vnbenr <> .vINT THEN
   GOTO DisplayError
ENDIF

--Indexed read thru INDEX CETAT. vINT = 343
SELECT COUNT(cetat) INTO vINT FROM commande
IF vnbenr <> .vINT THEN
   GOTO DisplayError
ENDIF

-- No error. Continue


>>
, there is no way to correct it without having all users exit and doing a
reload (PACK INDEX does nothing).
<<

In my case, PACK KEYS works OK and restore corrects keys

It would be nice to get from RBTI a utility that does the job for every
table .....

Best regards,


J.M. GRATIAS, Logimatique
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to