delphi - Code sample for freeing advantage database server table -


i have set of tables included in advantage database data dictionary. dictionary no longer available, , tables not open.

i free tables using code (not advantage data architect).

the reference can find function listed in called adsddfreetable.

the documentation function @ link:

http://devzone.advantagedatabase.com/dz/webhelp/advantage11.1/index.html?ace_adsddfreetable.htm

but not offer code sample, , cannot understand how use it.

would kind enough show code sample of how function used (with variables, not literals, file names, etc)

thanks much!

ace.pas defines adsddfreetable as

function adsddfreetable( puctablename: pacechar;                          pucpassword: pacechar ):unsigned32; {$ifdef win32}stdcall;{$endif}{$ifdef linux}cdecl;{$endif} 

the same ace.pas defines pacechar:

type   pacechar = pansichar; 

therefore, call function should straightforward:

var   tablename: ansistring; begin   tablename := 'c:\data\mytable.adt`;   if adsddfreetable(pansichar(tablename), nil) <> ads_freetablefailed     showmessage('table removed datadictionary')   else     // call adsgetlasterror retrieve reason failure; end; 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -