Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_ScripterSQL Script Generation and Processing

Public Function ProcessScript (
SqlScript As String,
dbConnect As xf_DbConnect,
UsePassThroughQuery As Boolean,
recsError As DAO.Recordset,
ScriptErrorTag As String,
Optional AddNewTablesToLinker As Boolean = False
) As Boolean

Process an entire sql script SQL commands/statements finish with the 'go' directive.
'go' must be alone on a line (may be padded with whitespace)

dbs

The database object to run the script against, or Nothing if using an ODBC database

cn

The connection object to run the script against, if dbs is Nothing

SqlScript as String

The script text

dbConnect as xf_DbConnect

(no description)

UsePassThroughQuery as Boolean

(no description)

recsError as DAO.Recordset

The open recordset to which to write errors. Use the shared error log by preference, but on occasion the local error log is used where the back end database may be offline.

ScriptErrorTag as String

The tag to be written to the error log

Optional AddNewTablesToLinker as Boolean = False

(no description)

Call Template:

Dim b As Boolean
b = xf.Scripter.ProcessScript(dbs, cn, SqlScript, dbConnect, UsePassThroughQuery, recsError, ScriptErrorTag)
b = xf.Scripter.ProcessScript(dbs, cn, SqlScript, dbConnect, UsePassThroughQuery, recsError, ScriptErrorTag, AddNewTablesToLinker)

See Also:

Example 1:

Set recs = xf.DbConnect.OpenDAORecordset("xf_tblErrorLogLocal")
WereErrors = Scripter.ProcessScript(sqlStr, dbs, cn, recs, "Test Script")
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd