SiteConfig.GetSQLScript
Use this method to get the specified SQL script file from the Administration database.
Definition
Function GetSQLScript(sResource As String,sScriptName As String) As String
Parameters
sResource
A String that contains the resource associated with the required SQL script file.
sScriptName
A String that contains the file name of the required SQL script file.
Return Values
If this method completes successfully, it returns a String that contains the SQL script file contents.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
All ADO, SQL, and ODBC errors will also be returned by this method.
Remarks
The Initialize method must be called before this method can be used.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
' sMyCatalog is an existing resource
' sMySQLFileName.sql and sContents are strings
' oSiteConfig is a Commerce SiteConfig object
sContents = oSiteConfig.GetSQLScript(sMyCatalog, sMySQLFileName.sql)