Open - method of the PmaDatabase object
Return value:
true - If opening the database and its table passed successfully
false - Otherwise
Note:
The table is opened or the SQL statement
SELECT is executed according to setting the
Type,
Database,
Table or
OpenSQL properties (initial values are taken over from the configurators of the "
Database" tab of this object).
Vice versa if this configurator is not checked.
Example1:
JavaScriptVBScriptSelect and copy to clipboard
if (oDb.IsOpen())
{
oDb.CloseTable();
}
oDb.Table = "Table1";
oDb.Open();
// ... do something with the table Table1
oDb.CloseTable();
oDb.Table = "Table2";
oDb.Open();
// ... do something with the table Table2
If oDb.IsOpen() Then
oDb.CloseTable
End If
oDb.Table = "Table1"
oDb.Open
' ... do something with the table Table1
oDb.CloseTable
oDb.Table = "Table2"
oDb.Open
' ... do something with the table Table2
Example2:
JavaScriptVBScriptSelect and copy to clipboard
if (oDb.IsOpen())
{
oDb.CloseTable();
}
oDb.OpenSQL = "SELECT * FROM Table WHERE MyColumn BETWEEN 10 AND 100";
oDb.Open();
// ... do something with the query "SELECT * FROM Table ..."
oDb.CloseTable();
oDb.OpenSQL = "SELECT MyColumn1, MyColumn2 FROM Table WHERE MyColumn1 > 10";
oDb.Open();
// ... do something with the query "SELECT MyColumn1, MyColumn2 FROM Table ..."
If oDb.IsOpen() Then
oDb.CloseTable
End If
oDb.OpenSQL = "SELECT * FROM Table WHERE MyColumn BETWEEN 10 AND 100"
oDb.Open
' ... do something with the query "SELECT * FROM Table ..."
oDb.CloseTable
oDb.OpenSQL = "SELECT MyColumn1, MyColumn2 FROM Table WHERE MyColumn1 > 10"
oDb.Open
' ... do something with the query "SELECT MyColumn1, MyColumn2 FROM Table ..."