Board index » delphi » BDE API

BDE API

I have the information about the BDE API but there are still a few question
this did not answer.  I am mainly interested in adding fields to a paradox
table.  I see the code I need to use to do this but I am confused about the
ChangeRec input.  What are the valid values of :
    szName : DBINAME(field name to be added, if not what is this?)
    iType : word(what are the valid values to create the different field
type((alpha, long integer, currency etc.)))
    iSubType : word(what is this for)
    iLength : word(length of field for fields with lengths:alpha, memo,
blobs etc.)
    iPrecision : word(I have no idea)

Any help in this area would be great.  Also if any one from Inprise is
reading this the BDE API help needs some help.  It is cryptic at best.  A
few more examples with sample input and output would be a vast improvement.

Ray Long

 

Re:BDE API


Ray,

The types are described in detail in the BDE help for the FLDDesc structure.

szName - is the name of the Field
iType - To get a list of Logical Types open the BDE32.HLP and do a find on
fldPDXBINARYBLOB and you will find a list of all available types.
iSubType - Specifies the subtype of the field if any
iLength - Actually is iUnits1 with is the number of characters or digits
iPrecision - Number of digits past the decimal point. If this is 0, then numbers
are stored in the form 1234. If this is 2, then you can store numbers like 12.34

"Management Data Systems, Inc." wrote:

Quote
> I have the information about the BDE API but there are still a few question
> this did not answer.  I am mainly interested in adding fields to a paradox
> table.  I see the code I need to use to do this but I am confused about the
> ChangeRec input.  What are the valid values of :
>     szName : DBINAME(field name to be added, if not what is this?)
>     iType : word(what are the valid values to create the different field
> type((alpha, long integer, currency etc.)))
>     iSubType : word(what is this for)
>     iLength : word(length of field for fields with lengths:alpha, memo,
> blobs etc.)
>     iPrecision : word(I have no idea)

> Any help in this area would be great.  Also if any one from Inprise is
> reading this the BDE API help needs some help.  It is cryptic at best.  A
> few more examples with sample input and output would be a vast improvement.

> Ray Long

--

_________________
Brett W. Fleming
Software Engineer
   VTLS, Inc.
~~~~~~~~~~~~~~~~~

Re:BDE API


On Mon, 8 Mar 1999 17:57:29 -0500, "Management Data Systems, Inc."

Quote
<m...@g-net.net> wrote:
>I have the information about the BDE API but there are still a few question
>this did not answer.  I am mainly interested in adding fields to a paradox
>table.  I see the code I need to use to do this but I am confused about the
>ChangeRec input.  What are the valid values of :

I don't know what the ChangeRec function is or does, but its
parameters seem to map directly to the BDE FLDDesc structure.

Quote
>    szName : DBINAME(field name to be added, if not what is this?)

Correct.

Quote
>    iType : word(what are the valid values to create the different field
>type((alpha, long integer, currency etc.)))

In the BDE this can be a physical type (specific for the database) or
a logical type (database independent), depending on the translation
mode.  Delphi uses the logical translation mode.  The BDE constants
are then for example:
  fldString, fldInt32, fldstMoney
You can find these types in the BDE help file.

Quote
>    iSubType : word(what is this for)

AFAIK this is not used for Paradox.  Leave it 0.

Quote
>    iLength : word(length of field for fields with lengths:alpha, memo,
>blobs etc.)

Correct.

Quote
>    iPrecision : word(I have no idea)

Typical, the number of decimal places for a BCD field.

HTH,

Jan

Other Threads