Xbasic

SQL::ConnectionGenerateSelectStatement Method

Syntax

Statement as C = GenerateSelectStatement as C (TableInfo as SQL::TableInfo)

Arguments

TableInfoSQL::TableInfo

A SQL::TableInfo object for the table created with the DIM statement.

Returns

StatementCharacter

A SQL SELECT statement.

Description

Generate a SQL Select statement for the table passed in.

Discussion

The GenerateSelectStatement() method generates a SQL Select statement for the table defined in TableInfo.

Example

dim conn as SQL::Connection
dim connString as C
dim ti as SQL::TableInfo
connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"
if .not. conn.open(connString)
    ui_msg_box("Error", conn.CallResult.text)
    end
end if
if .not. conn.GetTableInfo(ti, "customer")
    ui_msg_box("Error", conn.CallResult.text)
end if
ui_msg_box("Select Statement Format", conn.GenerateSelectStatement(ti))
conn.close()

See Also