I am trying to translate sample code to Delphi from the Advantage Database docs, but can't seem to get the variable declarations correct, starting with the varType and also cannot figure out MAX_STR_LEN (constant,function,something else?).
Here is the code in the sample:
UNSIGNED32 DoDates( void )
{
ADSHANDLE hTable;
UNSIGNED16 usLength;
UNSIGNED8 aucDOB[MAX_STR_LEN+1];
...
usLength = MAX_STR_LEN+1
AdsGetDate( hTable, "DOB", aucDOB, &usLength );
...
}
The Delphi code I've tried is:
procedure TForm1.fixARInvoiceEntryHeaderDates;
var
tableHandle:ADSHandle;
aucDOB:pansichar;
usLength:punsigned16;
begin
...
AdsGetDate(
tableHandle,
'inv_date',
aucDOB,
&usLength);
...
end;