| Stonefield Query SDK |
| OpenDataSource Method |
If Stonefield Query fails to connect the data source, the ErrorMessage property contains the error message from the database engine. The error is also logged in the diagnostic file.
Syntax
OpenDataSource(DataSourceName as String) as Boolean
Parameters
DataSourceName
The name of the data source to open.
Return Value
True if the data source was opened, False if not.
Example
This example, called from the OpenDataSource script for a database, calls OpenDataSource to open a specific data source regardless of the data source name the user selected.
Visual FoxPro
lparameters toApplication as SQApplication, toDatabase as Database, ;
tcDataSource
return toDatabase.OpenDataSource('System') VBScript
function Main(Application, Database, DataSource)
Main = Database.OpenDataSource("System")
end function JavaScript
function Main(Application, Database, DataSource) {
return Database.OpenDataSource('System') ;
}See Also
Database Object | OpenDataSource
| Last Updated: 02/05/2008 |