DbClose

ODBC function.

The DbClose function closes the dataset created by the DbSelect function. Not available in WinTask Lite.

Syntax

DbClose()
or
Ret=DbClose()

Return value

Ret, numeric return code. Ret is set to 0 if the close was successful, 1 if not.

Example

 

DbConnect("DSN=gpao;PWD=SILOG") ' connection to ODBC database called gpao

DbSelect("SELECT * FROM Business",DYNASET) ' select all records in table Business.

DbMoveLast() ' move to last record.

total=DbRecordCount() ' count the number of records.

MsgBox(str$(total)) ' display the record count.

DbClose() ' close dataset Business