Alaska Software Inc. - ADSDBE functions
Username: Password:
AuthorTopic: ADSDBE functions
Stanwood CampsmithADSDBE functions
on Mon, 17 Apr 2006 10:11:53 -0400
Hello;

Is there a reasonably simple way to get at the other AX_ functions not  
currently supported by ADSDBE ? Specifically, I'm having to code around  
functions like AX_KeyVal(), AX_KeyCount(), AX_SeekLast(), AX_IndexType(),  
AX_IndexInfo(), AX_UserLockID(), etc.

Granted, none of the functions I've listed are show-stoppers, but I don't  
like the idea of needlessly re-inventing wheels.

Thanks!

--Stanwood Campsmith
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
mark carew Re: ADSDBE functions
on Tue, 18 Apr 2006 06:52:26 +1000
On Mon, 17 Apr 2006 10:11:53 -0400, Stanwood Campsmith wrote:

> Hello;
> 
> Is there a reasonably simple way to get at the other AX_ functions not  
> currently supported by ADSDBE ? Specifically, I'm having to code around  
> functions like AX_KeyVal(), AX_KeyCount(), AX_SeekLast(), AX_IndexType(),  
> AX_IndexInfo(), AX_UserLockID(), etc.
> 
> Granted, none of the functions I've listed are show-stoppers, but I don't  
> like the idea of needlessly re-inventing wheels.
> 
> Thanks!
> 
> --Stanwood Campsmith
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Hi Stanwood

Here is a few I use in an ads system that I have converted from clipper

Regards
Mark





function AX_SETSCOPE(nScope,cScope)
  dbSetScope(nScope,cScope)
return nil


*
function AX_CLRSCOPE(nScope)
  dbClearScope(nScope)
return nil


*
function AX_KEYNO()
return ordKeyNo()


*
function AX_KEYCOUNT()
return ordCount()


*
function AX_CLEARSERVERAOF()
return TRUE


*
function AX_LOADED()
return TRUE


function ax_islocked()
return reclock()
Stanwood CampsmithRe: ADSDBE functions
on Tue, 18 Apr 2006 17:07:09 -0400
Thanks, Mark;

Do you have any wrappers for the management API functions (AX_UserNames(),  
AX_Lockowner(), AX_OpenTables(), etc.)

--Stanwood


On Mon, 17 Apr 2006 16:52:26 -0400, mark carew  
<markcarew@magicwanddept.com.au> wrote:

> On Mon, 17 Apr 2006 10:11:53 -0400, Stanwood Campsmith wrote:
>
> Hi Stanwood
>
> Here is a few I use in an ads system that I have converted from clipper
>
> Regards
> Mark
>


Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Clifford Wiernik Re: ADSDBE functions
on Tue, 18 Apr 2006 21:57:40 -0500
Stanwood Campsmith wrote:
> Thanks, Mark;
> 
> Do you have any wrappers for the management API functions 
> (AX_UserNames(),  AX_Lockowner(), AX_OpenTables(), etc.)
> 
> --Stanwood
> 
> 
> On Mon, 17 Apr 2006 16:52:26 -0400, mark carew  
> <markcarew@magicwanddept.com.au> wrote:
> 
>> On Mon, 17 Apr 2006 10:11:53 -0400, Stanwood Campsmith wrote:
>>
>> Hi Stanwood
>>
>> Here is a few I use in an ads system that I have converted from clipper
>>
>> Regards
>> Mark
>>
> 
> 
Load in the dbew32\adsdbe\samples\console directory if I recall.  There 
is a sample implementation of the ADS management console which has these 
items in it.  I use the lock owner functions in my application.
Tim SnyderRe: ADSDBE functions
on Wed, 19 Apr 2006 08:21:11 -0400
Stanwood,

Here's a general approach to implementing the ADS API.

Use the Console sample code to see how to write Xbase++ wrappers for the ADS 
functions.

Make a shortcut to ACE.HLP (part of the Advantage package.) You will need to 
refer to the syntax and explanation of the API functions often.

In ACE.HLP you will see parameters marked as I or O or I/O. "I" describes 
how the paramter is used to pass data into the function. "O" describes what 
is returned in the parameter. Naturally, these parameters should be passed 
by reference so you can get the returned value.

You may need to use I2bin() and bin2I() to convert parameter values passed 
to and fron the API.

Be aware you can open tables and indexes and manipulate ADS outside the Dac 
session. The dac session won't be aware of those openings. If you want to do 
things using tables and indexes open in the Dac session, there are 2 
functions that will return handles you can pass to ADS in your API calls.

DbInfo(ADSBO_TABLE_HANDLE) will return the table handle of the current work 
area.
OrdInfo(ADSORD_INDEX_HANDLE) will return the handle of the current index.

Wrap the functions.

Once you get the hang of it, all you need is time to write the wrappers.

It is possible to make sub-indexes using the API.

HTH,
Tim
Rodd GrahamRe: ADSDBE functions
on Wed, 19 Apr 2006 15:10:15 -0500
Stanwood,

The most comprehensive ADS function list I have seen comes with Roger Donnay's Express++.  I have not looked completely at ACE 
Wrappers from Boris Borzic, but I suspect he also has a comprehensive set of ADS wrappers.

I agree with you that reinventing the wheel is a waste of time.  The Xbase++ community should select one implementation of wrappers 
to use exclusively.  If an implementation does not exist, maybe an open source project would be the best way to get it to exist.

Rodd

"Stanwood Campsmith" <scampsmith@hiemstraoptical.com> wrote in message news:op.s75od3q81asmv7@stan1...
Hello;

Is there a reasonably simple way to get at the other AX_ functions not
currently supported by ADSDBE ? Specifically, I'm having to code around
functions like AX_KeyVal(), AX_KeyCount(), AX_SeekLast(), AX_IndexType(),
AX_IndexInfo(), AX_UserLockID(), etc.

Granted, none of the functions I've listed are show-stoppers, but I don't
like the idea of needlessly re-inventing wheels.

Thanks!

--Stanwood Campsmith
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/