VS:DBDocGetDB: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Transfer Orso to _c_) |
||
Line 30: | Line 30: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark> | <remark> | ||
[[User:CBM-c-|_c_]] 2010.09.27: Some observations: | |||
* no database connections in the document: returns FALSE | * no database connections in the document: returns FALSE | ||
* one database connected to the document: the string won't end with colon ";". | * one database connected to the document: the string won't end with colon ";". |
Latest revision as of 06:22, 30 December 2020
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Returns a string representing a ';' delimited list of the databases currently connected to the document.
FUNCTION DBDocGetDB(
VAR outDatabases :DYNARRAY[] of CHAR) : BOOLEAN;
def vs.DBDocGetDB(): return (BOOLEAN, outDatabases)
Parameters
outDatabases DYNARRAY[] of CHAR
Remarks
_c_ 2010.09.27: Some observations:
- no database connections in the document: returns FALSE
- one database connected to the document: the string won't end with colon ";".
- more databases connected: colon-separated string of database names.
Example
VectorScript
PROCEDURE ODBCtest; VAR outDatabases : DYNARRAY [] OF CHAR; BEGIN outDatabases := ''; IF DBDocGetDB(outDatabases) THEN BEGIN AlrtDialog(outDatabases); { colon-separated list of databases, if more than one } { .... } END; END; Run(ODBCtest);
Python
def ODBCtest(): outDatabases = '' hasDB, outDatabases= vs.DBDocGetDB() if hasDB: vs.AlrtDialog(outDatabases); #{ colon-separated list of databases, if more than one } ODBCtest()
Version
Availability: from Vectorworks 2011