Automation Reference - JMP
Automation Reference - JMP
Automation Reference - JMP
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Application Object <strong>Reference</strong> for Automating <strong>JMP</strong><br />
AUTODB Object<br />
AUTODB Object<br />
The AUTODB object provides a mechanism for accessing external data using ODBC. Some knowledge of SQL is<br />
necessary to do table manipulation.<br />
Methods<br />
Some knowledge of SQL is necessary to use these methods.<br />
Connect(ConnectInformation As String)<br />
Contains a connect string that will ultimately be used for an SQLDriverConnect call. An example is<br />
DSN=oracledata;DBQ=data_o7555;UID=UserID; pwd=userPassword<br />
See the automation example code for further examples.<br />
Disconnect() As Boolean<br />
Shuts down the connection.<br />
ExecuteSql(SQLStatement As String) As Boolean<br />
Executes the SQL statement and returns a boolean to indicate success or failure.<br />
Note:<br />
The SQL statement cannot be a Select statement that returns a record set. To send Select statements, use<br />
ExecuteSqlSelect(SQLSelectStatement As String) As DataTable.<br />
ExecuteSqlSelect(SQLSelectStatement As String) As DataTable<br />
Executes the SQL Select statement and returns a dispatch pointer to the newly loaded table.<br />
Note:<br />
The SQL Statement must be a Select statement that returns a record set. For other SQL commands, use<br />
ExecuteSql(SQLStatement As String) As Boolean.<br />
GetLastError()<br />
Returns the error code from the last Connect or ExecuteSQL call.<br />
OpenTable(TableName As String) As DataTable<br />
Open the database table, and return a dispatch pointer to the <strong>JMP</strong> table that is created to hold the data.<br />
SaveTable(TablePtr As DataTable, FileName As String)<br />
Given a dispatch pointer to a <strong>JMP</strong> data table, save the table to the database using the name provided.<br />
Page 41