Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_ScripterSQL Script Generation and Processing

Public Function RunODBCSql (
cn As DAO.Connection,
CommandSQL As String
) As String

Run a single SQL command against an SQL Server database.
Returns the text from each member of the error collection DBEngine.Errors if an error occurs (the VBA error object only returns the generic 'An ODBC error occurred')

cn as DAO.Connection

The SQL connection object

CommandSQL as String

The SQL to execute

Call Template:

Dim s As String
s = xf.Scripter.RunODBCSql(cn, CommandSQL)

See Also:

Example 1:

errorText = xf.Scripter.RunODBCSql("DELETE * FROM tblProduct WHERE ProductId=23")
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd