Xbasic

SQL_ResultSet_Preview Function

Syntax

V SQL_ResultSet_Preview(P ResultSet [,N MaximumNumerOfRows [,C Dialog_Title [,* cn ]]])

Arguments

ResultSet

A SQL::ResultSet object created by the SQL::Connection::Execute() method.

MaximumNumerOfRows

Numeric

Dialog_Title

Character

cn

*

Description

Displays an Xdialog showing the data in an SQL Result set

Discussion

The SQL_ResultSet_Preview() function displays the contents of a SQL::ResultSet returned from a back-end database by a SQL SELECT statement. This function is useful for testing a SQL SELECT statement.

images/SQR_Using_SQL_ResultSet_Preview().gif

Example 

dim cn as sql::connection
cn.open("{A5API=Access,FileName='C:\Databases\Northwind\northwind.mdb',UserName='Admin'}")
sql = sql_query_builder(cn)

? sql
= SELECT CompanyName, ContactName
FROM Customers
WHERE (Country = 'USA')
cn.Execute(sql)
sql_resultset_preview(cn.ResultSet)

See Also