SqlUtilTableIsAttached - cDbUpdateFunctionLibrary
Checks if a table is connected to SQL.
Type: Function
Parameters: String sTableName String sFieldName
Parameter |
Description |
sDriverID |
The database driver ID |
hTable |
Table handle (Filelist.cfg number) |
Syntax
Function SQLUtilTableIsAttached String sDriverID Handle hTable Returns Boolean
Call: |
Get SQLUtilTableIsAttached MSSQLDRV_ID Customer.File_Number to bOK |
Description
Checks if the passed table number; 1) Has a Filelist.cfg entry that points to SQL. 2) It has an .int file. If both are True the table should already be connected to SQL and the function returns True.
Example
Procedure OnClick
Boolean bOK
Get SQLUtilTableIsAttached of ghoDbUpdateFunctionLibrary Sales.File_Number to bOK
Send Info_Box ("The Sales table" * If(bOK,"does", "doesn't") * "exist as an SQL table.")
End_Procedure