Board index » delphi » Help: BDE Call to DbiDoRestructure

Help: BDE Call to DbiDoRestructure

I'm trying to use the BDE to change the structure of a Paradox table and
of all things I'm hung up in one spot. The BDE manual has no example of
assigning a pointer to an enumerated value and I can't seem to assign the
crMODIFY value to the pecrFldOp field in the CRTblDesc record. Does
anybody know how to do this in Delphi?

I have been able to figure out how to set up every thing else, including
iterating through and accessing the field descriptors. Here's where I'm
stuck:

        with TblDesc do
        begin
          StrPCopy(szTblName, tblPack.TableName);
          StrCopy(szTblType, szParadox);
          iFldCount := TblCurProps.iFields;
          pFldDesc := pFldArray;

          pecrFldOp :=  ????????????????????

I tried the following but they don't work, and I'm going nuts!!:

        pecrFldOp := crMODIFY;

        pecrFldOp^ := crMODIFY;

        pecrFldOp^  := CRFldOp(crMODIFY);

Cheers.. Bruce Caron

 

Re:Help: BDE Call to DbiDoRestructure


Quote
Bruce Caron wrote:

> I'm trying to use the BDE to change the structure of a Paradox table and
> of all things I'm hung up in one spot. The BDE manual has no example of
> assigning a pointer to an enumerated value and I can't seem to assign the
> crMODIFY value to the pecrFldOp field in the CRTblDesc record. Does
> anybody know how to do this in Delphi?

> I have been able to figure out how to set up every thing else, including
> iterating through and accessing the field descriptors. Here's where I'm
> stuck:

>         with TblDesc do
>         begin
>           StrPCopy(szTblName, tblPack.TableName);
>           StrCopy(szTblType, szParadox);
>           iFldCount := TblCurProps.iFields;
>           pFldDesc := pFldArray;

>           pecrFldOp :=  ????????????????????

> I tried the following but they don't work, and I'm going nuts!!:

>         pecrFldOp := crMODIFY;

>         pecrFldOp^ := crMODIFY;

>         pecrFldOp^  := CRFldOp(crMODIFY);

> Cheers.. Bruce Caron

Hi,

I please let me know if you get the solution.  Borland should have added
a TTable method to do this as is the case for Indices.  I have tried
(for days) using BDE calls and came to a dead end at the same place.

Hendrik
h...@xpoint.co.za

Other Threads