Description
Attributes in |
TAttributes in |
dbAttributes |
Attributes |
TAttributes |
dbAttributes |
Call this function after you call TDCreate (to create a new tabledef object) to save the tabledef in the database.
The function appends the object to the database’s TableDef collection.
You can use the tabledef as a temporary object while defining it by not appending it, but if you want to save and use it, you must call Append.
Note: If you attempt to append an unnamed tabledef (containing a null or empty string), MFC throws an exception, causing this function to return -2
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to determine whether the definition of the table underlying a TableDef object can be changed.
By default, a newly created table underlying a TableDef object can be updated, and an attached table underlying a TableDef object cannot be updated.
A TableDef object may be updatable, even if the resulting recordset is not updatable.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
CanUpdate Nonzero if the table structure (schema) can be modified (add or delete
fields and indexes ), otherwise 0.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
CanUpdate |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to close and release the TableDef object.
Usually after calling TDClose, you delete the tabledef object if it was allocated with TDNewTD.
You can call TDOpen again after calling TDClose. This lets you reuse the tabledef object.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this member function to create a new saved table.
Once you have named the tabledef, you can then call TDAppend to save the tabledef in the database’s TableDefs collection. After calling TDAppend, the tabledef is in an open state, and you can use it to create a Recordset object (See the RS...-Functions)
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to a string containing the name of the table.
SrcTable A pointer to a string containing the source table name. By default this
value is initialized as NULL.
Connect A pointer to a string containing the default connect string. By default this
value is initialized as NULL.
lAttribute
You can use the bitwise-OR to combine any of the following constants:
Constant Value Description
================================================================
dbAttachExclusive 0x00010000 For databases that use the MS Jet
dbAttachSavePWD 0x00020000 For databases that use the MS Jet
database engine, indicates that
the user ID and password for the
attached table are saved with the
connection information.
dbSystemObject 0x80000002 Indicates the table is a system
table provided by the MS Jet
database engine.
dbHiddenObject 0x00000001 Indicates the table is a hidden
table provided by the MS Jet
database engine.
TDHandle in |
Name |
lAttribute |
SrcTable |
Connect |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to add a field to the table.
A Field (OLE) object is created and appended to the Fields collection of the TableDef (OLE) object.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to a string expression specifying the name of this field.
Type A value indicating the data type of the field. The setting can be one of these values:
Constant Name Value Size (bytes) Description
================================================================
dbBoolean 1 1 BOOL
dbByte 2 1 BYTE
dbInteger 3 2 short
dbLong 4 4 long
dbCurrency 5 8 CURRENCY (COleCurrency)
dbSingle 6 4 float
dbDouble 7 8 double
dbDate 8 8 DATE (COleDateTime)
dbText 10 1-255 Text (LPCSTR,
aka char *)(CString)
dbLongBinary 11 0 Long Binary (OLE Object),
CLongBinary or CByteArray
dbMemo 12 0 Memo (LPCSTR,
aka char *)(CString)
Note: Do not use string data types for binary data. This causes your data to pass through the Unicode/ANSI translation layer, resulting in increased overhead and possibly unexpected translation.
Size A value that indicates the maximum size, in bytes, of a field that contains
text, or the fixed size of a field that contains text or numeric values.
The lSize parameter is ignored for all but text fields.
Attributes A value corresponding to characteristics of the field
A value corresponding to characteristics of the field and that can be combined using a bitwise-OR:
Constant Name Val Description
================================================================
dbFixedField 1 The field size is fixed (default for
Numeric fields).
dbVariableField 2 The field size is variable (Text fields only).
dbAutoIncrField 16 The field value for new records is
automatically incremented to a unique long
integer that cannot be changed. Only
supported for Microsoft Jet database tables.
dbUpdatableField 32 The field value can be changed.
dbDescending 1 The field is sorted in descending (Z-A or
100-0) order (applies only to a field object
in a Fields collection of an index object;
in MFC, index objects are themselves
contained in tabledef objects). If you omit
this constant, the field is sorted in
ascending (A-Z or 0-100) order (default).
TDHandle in |
Name |
Size |
Attributes |
Type |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to add an index to a table.
Indexes specify the order of records accessed from database tables and whether or not duplicate records are accepted. Indexes also provide efficient access to data.
You do not have to create indexes for tables, but in large, unindexed tables, accessing a specific record or creating a recordset can take a long time.
On the other hand, creating too many indexes slows down update, append, and delete operations as all indexes are automatically updated.
Consider these factors as you decide which indexes to create.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
iiHdl Handle of an IndexInfo
TDHandle in |
IIHandle out |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
TDHandle out |
IIHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
Call this function to remove a field and make it inaccessible.
You can use this member function on a new object that has not been appended to the database or when TDCanUpdate returns nonzero on the TableDef handle.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
FieldName A pointer to a string expression specifying the name of this field.
TDHandle in |
FieldName |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to delete an index in an underlying table.
You can use this member function on a new object that hasn’t been appended to the database or when TDCanUpdate returns nonzero on the TableDef handle.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
lndexName A pointer to a string expression specifying the name of this index.
TDHandle in |
IndexName |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
This function is Destructor of the TableDef Handle.
Parameters
tdHdl Handle of the TableDef
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
This function retrieves a value that indicates one or more characteristics of a TableDef object.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Attributes
You can use the bitwise-OR to combine any of the following constants:
Constant Value Description
================================================================
dbAttachExclusive 0x00010000 For databases that use the MS Jet
dbAttachSavePWD 0x00020000 For databases that use the MS Jet
database engine, indicates that
the user ID and password for the
attached table are saved with the
connection information.
dbSystemObject 0x80000002 Indicates the table is a system
table provided by the MS Jet
database engine.
dbHiddenObject 0x00000001 Indicates the table is a hidden
table provided by the MS Jet
database engine.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
Attributes |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to obtain the connect string for a data source.
For a TableDef object that represents an attached table, the string object consists of one or two parts (a database type specifier and a path to the database).
The path as shown in the table below is the full path for the directory containing the database files and must be preceded by the identifier "DATABASE=". In some cases (as with Microsoft Jet, Btrieve, and Microsoft Excel databases), a specific filename is included in the database path argument.
The following table shows possible database types and their corresponding database specifiers and paths:
Database type Specifier Path
======================================================================
Database using the Jet database engine
";" "drive:\\path\\filename.MDB"
dBASE III "dBASE III;" "drive:\\path"
dBASE IV "dBASE IV;" "drive:\\path"
Paradox 3.x "Paradox 3.x;" "drive:\\path"
Paradox 4.x "Paradox 4.x;" "drive:\\path"
Btrieve "Btrieve;" "drive:\\path\\filename.DDF"
FoxPro 2.0 "FoxPro 2.0;" "drive:\\path"
FoxPro 2.5 "FoxPro 2.5;" "drive:\\path"
FoxPro 2.6 "FoxPro 2.6;" "drive:\\path"
Excel 3.0 "Excel 3.0;" "drive:\\path\\filename.XLS"
Excel 4.0 "Excel 4.0;" "drive:\\path\\filename.XLS"
Excel 5.0 "Excel 5.0;" "drive:\\path\\filename.XLS"
Text "Text;" "drive:\\path"
ODBC "ODBC;
DATABASE=defaultdatabase;
UID=user;PWD=password;
DSN=datasourcename;
LOGINTIMEOUT=seconds"
(This may not be a
complete connection string for all servers;
not to have spaces between the parameters.)
Parameters
result Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
GetConnectionString A string containing the path and database type for the table.
Length maximum Length of pBuf
TDHandle in |
Length |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
GetConnectionString |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to determine the date and time the table underlying the TableDef object was created.
The date and time settings are derived from the computer on which the base table was created or last updated.
In a multiuser environment, users should get these settings directly from the file server to avoid discrepancies; that is, all clients should use a "standard" time source - perhaps from one server.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Date A DATE value containing the date and time the table underlying the
TableDef object was created.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
DATE |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to determine the date and time the table underlying the TableDef object was created.
The date and time settings are derived from the computer on which the base table was created or last updated.
In a multiuser environment, users should get these settings directly from the file server to avoid discrepancies; that is, all clients should use a "standard" time source - perhaps from one server.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Date A DATE value containing the date and time the table underlying the
TableDef object was created.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
DATE |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this member function to retrieve the number of fields defined in the table.
If its value is 0, there are no objects in the collection.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
FieldCount The number of fields in the table.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
FieldCount |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to obtain various kinds of information about a field defined in the TableDef
One version of the function (this one) lets you look up a Field by index.
The other version (TDGetFieldInfoByName) lets you look up a Field by name.
For a description of the information returned in fiHdl, see the FI...-Functions. These all return certain items of information.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Index The zero-based index of the desired field in the TableDef’s Fields collection
fiHdl A handle of a FieldInfo object that will contain the information requested.
TDHandle in |
FIHandle in |
Index |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
FIHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to obtain various kinds of information about a field defined in the TableDef.
One version of the function (this one) lets you look up a Field by name.
The other version (TDGetFieldInfoByIdx) lets you look up a Field by Index.
For a description of the information returned in fiHdl, see the FI...-Functions. These all return certain items of information.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to the name of the field object.
The name is a string with up to 64 characters that uniquely names the field.
fiHdl A handle of a FieldInfo object that will contain the information requested.
TDHandle in |
FIHandle in |
Name |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
FIHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this member function to obtain the number of indexes for a table.
If its value is 0, there are no indexes in the collection.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Indexes The number of Indexes for the table.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
Indexes |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to obtain various kinds of information about an Index defined in the Tabledef.
One version of the function (this one) lets you look up an Index by its position in the collection.
The other version (TDGetIndexInfoByName) lets you look up an Index by name.
For a description of the information returned in iiHdl, see the II...-Functions. These all return certain items of information.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Index The zero-based index of the desired index in the TableDef’s Indexes collection.
iiHdl A handle of a IndexInfo object that will contain the information requested.
TDHandle in |
IIHandle in |
Index |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
IIHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to obtain various kinds of information about an index in the TableDef.
One version of the function (this one) lets you look up an Index by name.
The other version (TDGetIndexInfoByIdx) lets you look up a an Index by its position in the collection.
For a description of the information returned in iiHdl, see the II...-Functions. These all return certain items of information.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to the name of the index object.
The name is a string with up to 64 characters that uniquely names the index.
iiHdl A handle of a IndexInfo object that will contain the information requested.
TDHandle in |
IIHandle in |
Name |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
IIHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to obtain the user-defined name of the underlying table.
This name starts with a letter and can contain a maximum of 64 characters. It can include numbers and underscore characters but cannot include punctuation or spaces.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
TDName A user-defined name for a table.
Length maximum Length of TDName
TDHandle in |
Length |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
TDName |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to find out how many records are in a TableDef object.
Calling TDGetRecordCount with a table-type TableDef object handle reflects the approximate number of records in the table and is affected immediately as table records are added and deleted.
Rolled back transactions will appear as part of the record count until you call WSCompactDatabase.
A TableDef object with no records has a record count property setting of 0. When working with attached tables or ODBC databases, TDGetRecordCount always returns -1 in pL (not in the return value!).
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
RecordCount The number of records accessed in a tabledef object.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
RecordCount |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
all this function to retrieve the name of an attached table in a source database.
An attached table is a table in another database linked to a Microsoft Jet database.
Data for attached tables remains in the external database, where it can be manipulated by other applications.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
TDSourceTableName A string that specifies the source name of an attached table,
or an empty string if a native data table.
Length maximum Length of TDSourceTableName.
TDHandle in |
Length |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
TDSourceTableName |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to retrieve the validation rule for a tabledef.
Validation rules are used in connection with update operations. If a tabledef contains a validation rule, updates to that tabledef must match predetermined criteria before the data is changed. If the change does not match the criteria, an exception is thrown, causing this function to return -2.
For a TableDef object, this string is read-only for an attached table and read/write for a base table.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
ValidationRule A string that validates the data in a field as it is changed or added to a table.
Length maximum Length of ValidationRule.
TDHandle in |
Length |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
ValidationRule |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
all this function to retrieve the string to display when a user enters data that does not match the validation rule.
For a TableDef object, this CString is read-only for an attached table and read/write for a base table.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
ValidationText A string that specifies the text displayed if the user enters data that does not
match the validation rule.
Length maximum Length of ValidationText.
TDHandle in |
Length |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
ValidationText |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to determine whether the TableDef object is currently open.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
TDIsOpen Nonzero if the TableDef object is open; otherwise 0.
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
TDIsOpen |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Constructs a TableDef object.
After constructing the object, you must call the TDCreate or TDOpen function.
When you finish with the object, you must call the TDClose function and destroy the TableDef object with TDDeleteTD .
Parameters
dbHdl Handle of the Database you want to use for the TableDef
tdHdl Handle of the TableDef as return value
DBHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
TDHandle out |
DBHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this member function to open a TableDef previously saved in the database’s TableDef’s collection.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to a string containing the name of the table.
TDHandle in |
Name |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to update the connection information for an attached table.
You change the connection information for an attached table by calling TDSetConnect with the corresponding TableDef handle and then using the TDRefreshLink member function to update the information.
When you call TDRefreshLink, the attached table’s properties are not changed.
To force the modified connect information to take effect, all open Recordset objects based on this tabledef must be closed.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
TDHandle in |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
TDHandle out |
FResult |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
This function sets a value that indicates one or more characteristics of a TableDef object.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Attr
You can use the bitwise-OR to combine any of the following constants:
Constant Value Description
================================================================
dbAttachExclusive 0x00010000 For databases that use the MS Jet
dbAttachSavePWD 0x00020000 For databases that use the MS Jet
database engine, indicates that
the user ID and password for the
attached table are saved with the
connection information.
dbSystemObject 0x80000002 Indicates the table is a system
table provided by the MS Jet
database engine.
dbHiddenObject 0x00000001 Indicates the table is a hidden
table provided by the MS Jet
database engine.
TDHandle in |
Attr |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
TDHandle out |
FResult |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
all this function to set the connect string for a data source.
For a TableDef object that represents an attached table, the string object consists of one or two parts (a database type specifier and a path to the database).
The path as shown in the table below is the full path for the directory containing the database files and must be preceded by the identifier "DATABASE=". In some cases (as with Microsoft Jet, Btrieve, and Microsoft Excel databases), a specific filename is included in the database path argument.
The following table shows possible database types and their corresponding database specifiers and paths:
Database type Specifier Path
======================================================================
Database using the Jet database engine
";" "drive:\\path\\filename.MDB"
dBASE III "dBASE III;" "drive:\\path"
dBASE IV "dBASE IV;" "drive:\\path"
Paradox 3.x "Paradox 3.x;" "drive:\\path"
Paradox 4.x "Paradox 4.x;" "drive:\\path"
Btrieve "Btrieve;" "drive:\\path\\filename.DDF"
FoxPro 2.0 "FoxPro 2.0;" "drive:\\path"
FoxPro 2.5 "FoxPro 2.5;" "drive:\\path"
FoxPro 2.6 "FoxPro 2.6;" "drive:\\path"
Excel 3.0 "Excel 3.0;" "drive:\\path\\filename.XLS"
Excel 4.0 "Excel 4.0;" "drive:\\path\\filename.XLS"
Excel 5.0 "Excel 5.0;" "drive:\\path\\filename.XLS"
Text "Text;" "drive:\\path"
ODBC "ODBC;
DATABASE=defaultdatabase;
UID=user;PWD=password;
DSN=datasourcename;
LOGINTIMEOUT=seconds"
(This may not be a
complete connection string for all servers;
not to have spaces between the parameters.)
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Connect A string containing the path and database type for the table.
TDHandle in |
Connect |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to set a user-defined name for a table.
The name must start with a letter and can contain a maximum of 64 characters.
It can include numbers and underscore characters but cannot include punctuation or spaces.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to a string expression that specifies a name for a table.
TDHandle in |
Name |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to specify the name of an attached table or the name of the base table on which the TableDef object is based, as it exists in the original source of the data.
You must then call TDRefreshLink.
This property setting is empty for a base table and read/write for an attached table or an object not appended to a collection.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Name A pointer to a string expression that specifies a table name in the external database.
For a base table, the setting is an empty string ("").
TDHandle in |
Name |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this member function to set a validation rule for a tabledef.
Validation rules are used in connection with update operations. If a tabledef contains a validation rule, updates to that tabledef must match predetermined criteria before the data is changed.
If the change does not match the criteria, an exception containing the text of TDGetValidationText is displayed.
Validation is supported only for databases that use the Microsoft Jet database engine. The expression cannot refer to user-defined functions, domain aggregate functions, SQL aggregate functions, or queries. A validation rule for a TableDef object can refer to multiply fields in that object.
For example, for fields named hire_date and termination_date, a validation rule might be:
TDSetValidationRule(MyRShdl,"hire_date>termination_date");
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Rule A pointer to a string expression that validates an operation.
TDHandle in |
Rule |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
Call this function to set the exception text of a validation rule for a TableDef object with an underlying base table supported by the Microsoft Jet database engine.
You cannot set the validation text of an attached table.
Parameters
error Errorcode of this operation: -1 if handle not initialized, 1 if function
works correct, -2 if Error.
tdHdl Handle of the TableDef
Text A pointer to a string expression that specifies the text displayed if entered
data is invalid.
TDHandle in |
Text |
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
FResult |
TDHandle out |
error out The error out cluster passes error or warning information out of a VI to be used by other VIs. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
code The code input identifies the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |
source The source string describes the origin of the error or warning. The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed. |