Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_DataListDataList Base Class

Public Function AddSQLResultsetDbConn (
dbConn As xf_DbConnect,
sql As String,
Optional ListRowCountSQL As String = "",
Optional AppendToSet As Boolean = False,
Optional ActivateColGroupFunctions As Boolean = False,
Optional UseExtendedRSType As Boolean = False,
Optional SuppressSqlError As Boolean = False,
Optional AddFilterColumnName As String = ""
) As Variant

Read the result set of an SQL query from the database into the DataList. Use the result set column names to set up the column metadata.

DbConn

A DbConnect object to use (xf.DbConnect is the deafult XF DbConnect object which points to the current database)

Sql

The SQL query to use

dbConn as xf_DbConnect

(no description)

sql as String

(no description)

Optional ListRowCountSQL as String = ""

Run this SQL first to return a row count. This allows the number of rows to be allocated at the start and avoids progressing ReDim operations to expand the underlying storage array. Can increase loading speed for large datasets.

Optional AppendToSet as Boolean = False

(no description)

Optional ActivateColGroupFunctions as Boolean = False

(no description)

Optional UseExtendedRSType as Boolean = False

(no description)

Optional SuppressSqlError as Boolean = False

(no description)

Optional AddFilterColumnName as String = ""

(no description)

Call Template:

Dim obj As New xf_DataList
Dim v As Variant
v = obj.AddSQLResultsetDbConn(DbConn, Sql, dbConn, sql)
v = obj.AddSQLResultsetDbConn(DbConn, Sql, dbConn, sql, ListRowCountSQL, AppendToSet, ActivateColGroupFunctions, UseExtendedRSType, SuppressSqlError, AddFilterColumnName)

See Also:

Example 1:

lst.AddSQLResultsetDbConn xf.DbConnect, "SELECT * FROM Categories"
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd