Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ADS data dictionary and indexing problem (2)

3 posts in Xbase++ Last posting was on 2008-07-01 16:47:01.0Z
Toma? Grom Posted on 2008-06-17 07:16:37.0Z
From: "Toma? Grom" <tomaz.grom@siol.net>
Newsgroups: Advantage.Xbase++
Subject: ADS data dictionary and indexing problem (2)
Date: Tue, 17 Jun 2008 09:16:37 +0200
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 89.212.202.125
Message-ID: <485763d0@solutions.advantagedatabase.com>
X-Trace: 17 Jun 2008 01:12:16 -0700, 89.212.202.125
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!89.212.202.125
Xref: solutions.advantagedatabase.com Advantage.Xbase++:967
Article PK: 1140813

Hello,

I encountered a hidden trouble when indexing with ADS API call to a data
table through data dictionary. (ADS 8.1)

(nRet:=DllCall( PAdsDllHandle, DLL_STDCALL, "AdsCreateIndex",;)

The problem appears when data table is not exclusively accesible in the
time, indexing process starts.
But in spite of that program reacts pretty normal, that is, makes tag after
tag, maybe a little quicker, than normal and produce common index .CDX file,
like otherwise.

But that index is corrupted and when looking data through it, they are
sorted wrong.

But all the way system does not complain. No error message or something,
like we are used in xBase++, when data table can not be opened exclusively.

The problem remains active till I remove such table from the data dictionary
and append it
again and make a new index.
If I make a new index many times, but without removing the table from the
dict and append it again, there is no gain.

My questions are:
1.
Is there any way to check the exclusive acces status in ADS dictionary,
before starting each data table indexing process ?

2.
Is there any other method to refresh the dictionary, that looks like it
blocks somehow the real and right new index creation ?

3.
Any other suggestion will be of course also appreciated

Best regards

Toma?


Toma? Grom Posted on 2008-07-01 08:25:23.0Z
From: "Toma? Grom" <tomaz.grom@siol.net>
Newsgroups: Advantage.Xbase++
References: <485763d0@solutions.advantagedatabase.com>
Subject: Re: ADS data dictionary and indexing problem (2)
Date: Tue, 1 Jul 2008 10:25:23 +0200
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 89.212.202.125
Message-ID: <4869e8f0@solutions.advantagedatabase.com>
X-Trace: 1 Jul 2008 02:21:04 -0700, 89.212.202.125
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!89.212.202.125
Xref: solutions.advantagedatabase.com Advantage.Xbase++:968
Article PK: 1140815

I will ask another way:

When I open a modul with several data table in shared mode inside my app and
then open indexing module and try to index one of those SHAREd opened
tables, the command

nAceDllCallRet := DllCall( PAdsDllHandle, DLL_STDCALL,
"AdsDDRemoveIndexFile", PAdsConnectionHandle, cTableName, cTableName+".cdx",
.T.)

returns an error 5054.

But index structure from ADS data dictionary is still deleted. Phisical
index on the other hand is not deleted from the directory.

Why is that so ?

Because afterwards a conflict arise, when using such table.

Best regards

Toma?