Page 1 of 1

ADS Table Handles

Posted: Thu Apr 05, 2012 12:01 pm
by Josh-Ferrus
So, I am working on getting some Advantage Database Server integration into our program. I have followed the document that Roger wrote on the subject (at http://www.sybase.com/files/White_Paper ... ide_wp.pdf) and have succeeded in getting to a place where I am easily connecting to an ADS data dictionary using a DacSession, opening databases using just dbusearea(.t., AdsSession(), cDbf, cAlias), and manipulating that data. Hurray!

My question is: Is there a way to obtain the handle to the table that is open? I can obtain the connection handle easily enough (AdsSession():getConnectionHandle()) but I'm not seeing any way to get the individual table handles. They are necessary if I want to use a lot of the ACEFUNCTION's that Roger has defined, so I assume they are obtainable. Is there just something I'm missing?

Specifically, I'm looking to add an ACEFUNCTION for the AdsGetLastAutoInc() ace function, which requires a table handle.

Thanks!

Re: ADS Table Handles

Posted: Thu Apr 05, 2012 1:00 pm
by rdonnay
AdsGetTableHandle( cAlias, @nTableHandle )

Re: ADS Table Handles

Posted: Thu Apr 05, 2012 1:09 pm
by Josh-Ferrus
It works!

I feel silly for not finding that function earlier. Thanks Roger.