SqlTabSource$

Returns the name and number of the table from which a result column is derived.

Syntax

SqlTabSource$ ( sqlconn%, column%, tabnum% )

where

sqlconn%
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.
column%
Is the number of the result column. Column numbers start at 1.
tabnum%
Is an integer variable to receive the table number. Many DB-Library for Visual Basic functions that operate in browse mode accept either a table name or a table number. If SqlTabSource$ returns an empty string, tabnum% is set to -1.

Returns

A string containing the name of the table from which a result column derives. If an empty string is returned, it means one of the following:

Remarks

SqlTabSource$ is a DB-Library for Visual Basic browse-mode function. For a detailed discussion of browse mode, see DB-Library for Visual Basic Programming.

Use SqlTabSource$ to determine which tables provide the columns in the current set of result rows. This information is valuable when using SqlQual$ to construct WHERE clauses for UPDATE and DELETE statements based on ad hoc queries. When the query is hard-coded into the application, SqlTabSource$ is unnecessary. You can call SqlTabSource$ any time after you call SqlResults%.

See Also

SqlColBrowse%, SqlColSource$, SqlQual$, SqlTabBrowse%, SqlTabCount%, SqlTabName$, SqlTsNewLen%, SqlTsNewVal$, SqlTsPut%