PRB: Call to DBTables() Returns Empty Cursor

ID: Q108625

The information in this article applies to:

SYMPTOMS

Calling the DBTables() function with the Microsoft FoxPro Connectivity Kit returns an empty cursor despite the fact that several tables exist in the database on the server.

CAUSE

The second argument (table type) should be enclosed with both single and double quotation marks.

RESOLUTION

The following example shows how to use the DBTables() function to retrieve information about the tables in the current database on the server. This example assumes that a valid connection to the server exists and that the variable mhandle contains the handle for this connection.

   =DBTables(mhandle, "'TABLE'", "MyCursor")

If more than one table type is specified, each type should be enclosed in single quotation marks and the entire string should be enclosed in double quotation marks as shown in the following example:

   =DBTables(mhandle, "'TABLE', 'VIEW'", "MyCursor")

REFERENCES

Microsoft FoxPro Connectivity Kit "User's Guide," version 2.5, pages 50-51

Additional reference words: FoxDos FoxWin 2.50 2.50a 2.50b blank null ck KBCategory: kbprg kbprb KBSubcategory: FxtoolCk

Last Reviewed: June 27, 1995