TableOpenADO

Top  Previous  Next

Prototype

 

IntTableHandle:=TableOpenADO(strDataBaseName,strTableName,strUser,strPassword)

 

Description

 

Opens a table from a database using ADO dbms connectivity.

 

Parameters

 

strDataBaseName: string corresponding to a full connection string or to a .udl file contained in the default Universal Data Link files directory.

 

strTableName: string corresponding to the file table to open.

 

strUser: user name to login to database

 

strPassword: password to login to database

 

Returned value

 

IntTableHandle: integer value corresponding to the table handle.

 

Notes

 

This function asks for the name of a database standard as well as the name of an existing table in the database.

 

The returned value can be used in the functions that work on the tables (TableClose, TableRecordCount, TableFirst,…).

 

Example

 

// Store the table handle

TableOne:= TableOpenADO('myconnection.udl','statistics','','');

 

// Set the current record edit mode

TableEdit(TableOne);

 

// Execute other operations as changing field

 

// Confirm the change

TablePost(TableOne);

 

// Close the table

TableClose(TableOne);