18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

ODBCOpen<br />

Opens a connection to the database and returns a numeric handler to be used by other ODBC functions.<br />

Function Group Execution Windows Embedded Thin Client<br />

ODBCOpen ODBC Synchronous Supported Not supported Executed on Server<br />

Syntax<br />

ODBCOpen( strDsn, strUser, strPassw, strTable, strFilter, strSort )<br />

strDsn<br />

The name of the data source.<br />

strUser<br />

The user name.<br />

strPassw<br />

The password.<br />

strTable<br />

The name of the database table<br />

strFilter<br />

The SQL WHERE clause.<br />

strSort<br />

The SQL ORDER BY clause.<br />

Returned value<br />

n<br />

−1<br />

−2<br />

On success, returns the handler to identify the database<br />

Invalid parameter<br />

DSN or TableName contain an empty string<br />

Notes<br />

This function does not read or write any data; it simply creates a handle to manipulate the database. You<br />

must bind the columns using the ODBCBindCol function, and then you must call the ODBCQuery function to<br />

retrieve the first record.<br />

Examples<br />

Tag Name<br />

Tag<br />

Expression<br />

ODBCOpen( "MyDSNFile", "Alex", "", "Table1", "Name='Mayer'", "Name<br />

ASC" )<br />

Tag ODBCOpen( "DSNFileName", "Robert", "Robot", "Table1", "", "" )<br />

ODBCQuery<br />

Retrieves the currently selected record from a database.<br />

Function Group Execution Windows Embedded Thin Client<br />

ODBCQuery ODBC Synchronous Supported Not supported Executed on Server<br />

<strong>InduSoft</strong> Web Studio Page 701

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!