Board index » delphi » Direct calls to BDE API

Direct calls to BDE API

Can anyone provide a code sample demonstrating the proper way to use some of
the dbi_______ function call. My primary function of interest is
dbiGetFieldDescs (plus any preliminary call which may be required to make this
call).

Thanks,
Keith Rainey

 

Re:Direct calls to BDE API


In <3vqdcm$...@usenet1.interramp.com> krai...@interramp.com (J. Keith Rainey) writes:

Quote
>Can anyone provide a code sample demonstrating the proper way to use some of
>the dbi_______ function call. My primary function of interest is
>dbiGetFieldDescs (plus any preliminary call which may be required to make this
>call).

Try something like this (totally untested code):

uses DbiTypes, DbiProcs;

const
  NumFields = 10;
var
  FieldDescriptors = array[0..NumFields-1] of DbiTypes.FLDDesc;
  DbiRes : DbiTypes.DbiResult;

begin
  DbiRes := DbiProcs.DbiGetFieldDescs(Table1.Handle, @FieldDescriptors);
  if DbiRes = DBIERR_NONE then
    { Things went ok - use FieldDescriptors array - see DbiTypes for "doc" }
  else
    { Error handling }
end.

The general idea is that the Cursor handle that the Dbi routines expect is
the Handle property of the dataset (table, query etc.).

--
 Hallvard Vassbotn  | Falcon AS (a Reuters company) | Without programmers,
 hallv...@falcon.no | Stranden 1, 0250 OSLO, Norway | the world would stop!

Re:Direct calls to BDE API


krai...@interramp.com (J. Keith Rainey) wrote:

Quote
>Can anyone provide a code sample demonstrating the proper way to use some of
>the dbi_______ function call. My primary function of interest is
>dbiGetFieldDescs (plus any preliminary call which may be required to make this
>call).

I do not know if it is sold seperatly but with my copy of C++ 4.5 I
bought a copy of the 'BDE' and the documentation of de BDE with this
product is quite complete. If you plan regulary 'calling' the API,
maybe this product is worthwhile.

Wilko van der Ploeg
ATDT Consultancy

Other Threads