DBDiagnose ODBC 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   DBDiagnose
:BOOLEAN ;

Python:

def  vs.DBDiagnose():
   return BOOLEAN

Description:

Test ODBC connectivity and creates log file in application folder. Returns true if succeeded.



  DBDocAddConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocAddConn
(   dsn :DYNARRAY[] of CHAR;
    userName :DYNARRAY[] of CHAR;
    password :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBDocAddConn(dsn, userName, password):
   return BOOLEAN

Description:

Add a database connection to the current document



  DBDocGetColumns ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocGetColumns
(   database :STRING;
    table :STRING;
  VAR  outNames :DYNARRAY[] of CHAR;
  VAR  outTypes :DYNARRAY[] of CHAR;
  VAR  outCanBeKey :DYNARRAY[] of CHAR;
  VAR  outIsKey :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBDocGetColumns(database, table):
   return (BOOLEAN, outNames, outTypes, outCanBeKey, outIsKey)

Description:

Returns a string representing a ';' delimited lists of the specified table data.



  DBDocGetConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocGetConn
(   databaseName :DYNARRAY[] of CHAR;
  VAR  outUserName :DYNARRAY[] of CHAR;
  VAR  outPassword :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBDocGetConn(databaseName):
   return (BOOLEAN, outUserName, outPassword)

Description:

Get database connection info.



  DBDocGetDB ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocGetDB
VAR outDatabases:DYNARRAY[] of CHAR ) :BOOLEAN ;

Python:

def  vs.DBDocGetDB():
   return (BOOLEAN, outDatabases)

Description:

Returns a string representing a ';' delimited list of the databases currectly connected to the document.



  DBDocGetTables ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocGetTables
(   database :STRING;
  VAR  outTables :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBDocGetTables(database):
   return (BOOLEAN, outTables)

Description:

Returns a string representing a ';' delimited list of the tables in the specified database.



  DBDocHasConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocHasConn
:BOOLEAN ;

Python:

def  vs.DBDocHasConn():
   return BOOLEAN

Description:

Checks if the current document has connections to an ODBC data source.



  DBDocRemoveConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocRemoveConn
( databaseName:DYNARRAY[] of CHAR ) :BOOLEAN ;

Python:

def  vs.DBDocRemoveConn(databaseName):
   return BOOLEAN

Description:

Remove a database connection from the current document



  DBDocSetColKey ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBDocSetColKey
(   databaseName :DYNARRAY[] of CHAR;
    tableName :DYNARRAY[] of CHAR;
    columnName :DYNARRAY[] of CHAR;
    setIsKey :BOOLEAN
) :BOOLEAN ;

Python:

def  vs.DBDocSetColKey(databaseName, tableName, columnName, setIsKey):
   return BOOLEAN

Description:

Get database table column to be as a key.



  DBGetFormatConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBGetFormatConn
(   formatName :STRING;
  VAR  outDatabase :STRING;
  VAR  outTable :STRING
) :BOOLEAN ;

Python:

def  vs.DBGetFormatConn(formatName):
   return (BOOLEAN, outDatabase, outTable)

Description:

Returns the ODBC connection for the specified format.



  DBGetFormatFieldConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBGetFormatFieldConn
(   formatName :STRING;
  VAR  fieldName :STRING;
  VAR  columnName :STRING;
  VAR  linkType :INTEGER
) :BOOLEAN ;

Python:

def  vs.DBGetFormatFieldConn(formatName):
   return (BOOLEAN, fieldName, columnName, linkType)

Description:

Get ODBC connection for the specified format field.



  DBObjSQLGetRead ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBObjSQLGetRead
(   hObject :HANDLE;
  VAR  SQLSentence :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBObjSQLGetRead(hObject):
   return (BOOLEAN, SQLSentence)

Description:

Get an object's SQL sentence for ODBC read.



  DBObjSQLGetWrite ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBObjSQLGetWrite
(   hObject :HANDLE;
  VAR  SQLSentence :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBObjSQLGetWrite(hObject):
   return (BOOLEAN, SQLSentence)

Description:

Get an object's SQL sentence for ODBC write.



  DBObjSQLSetRead ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBObjSQLSetRead
(   hObject :HANDLE;
    SQLSentence :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBObjSQLSetRead(hObject, SQLSentence):
   return BOOLEAN

Description:

Set an object's SQL sentence for ODBC read.



  DBObjSQLSetWrite ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBObjSQLSetWrite
(   hObject :HANDLE;
    SQLSentence :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBObjSQLSetWrite(hObject, SQLSentence):
   return BOOLEAN

Description:

Set an object's SQL sentence for ODBC write.



  DBSetFormatConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBSetFormatConn
(   formatName :STRING;
    database :STRING;
    tableName :STRING
) :BOOLEAN ;

Python:

def  vs.DBSetFormatConn(formatName, database, tableName):
   return BOOLEAN

Description:

Set ODBC connection for the specified format.



  DBSetFormatFieldConn ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBSetFormatFieldConn
(   formatName :STRING;
    fieldName :STRING;
    columnName :STRING;
    linkType :INTEGER
) :BOOLEAN ;

Python:

def  vs.DBSetFormatFieldConn(formatName, fieldName, columnName, linkType):
   return BOOLEAN

Description:

Set ODBC connection for the specified format field.



  DBShowDBTableDlg ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBShowDBTableDlg
(   database :STRING;
    table :STRING
) :BOOLEAN ;

Python:

def  vs.DBShowDBTableDlg(database, table):
   return BOOLEAN

Description:

Show the specified database table dialog.



  DBShowManageDBsDlg ODBC 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   DBShowManageDBsDlg
;

Python:

def  vs.DBShowManageDBsDlg():
   return None

Description:

Show the database manager dialog.



  DBShowObjConnDlg ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBShowObjConnDlg
:BOOLEAN ;

Python:

def  vs.DBShowObjConnDlg():
   return BOOLEAN

Description:

Show the object connection dialog for the selected objects.



  DBSQLExecute ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBSQLExecute
(   database :STRING;
    SQLQuery :DYNARRAY[] of CHAR;
  VAR  outColumnCnt :LONGINT;
  VAR  outResultSetInst :LONGINT
) :BOOLEAN ;

Python:

def  vs.DBSQLExecute(database, SQLQuery):
   return (BOOLEAN, outColumnCnt, outResultSetInst)

Description:

Executes a SQL in the specified database connected to the current document. Note! The resultSetInstance have to be deleted with call to 'DBSQLExecuteDelete'



  DBSQLExecuteDelete ODBC 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   DBSQLExecuteDelete
VAR resultSetInst:LONGINT ) ;

Python:

def  vs.DBSQLExecuteDelete():
   return resultSetInst

Description:

Deletes a resultSetInstance created with 'DBSQLExecute' or 'DBSQLExecuteDSN'



  DBSQLExecuteDSN ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBSQLExecuteDSN
(   dsn :DYNARRAY[] of CHAR;
    userName :DYNARRAY[] of CHAR;
    password :DYNARRAY[] of CHAR;
    SQLQuery :DYNARRAY[] of CHAR;
  VAR  outColumnCnt :LONGINT;
  VAR  outResultSetInst :LONGINT
) :BOOLEAN ;

Python:

def  vs.DBSQLExecuteDSN(dsn, userName, password, SQLQuery):
   return (BOOLEAN, outColumnCnt, outResultSetInst)

Description:

Executes a SQL in the specified DSN registered in the ODBC manager. Note! The resultSetInstance have to be deleted with call to 'DBSQLExecuteDelete'



  DBSQLExecuteError ODBC 
Vectorworks 2012

VectorScript Declaration:

FUNCTION   DBSQLExecuteError
( VAR  message :DYNARRAY[] of CHAR;
  VAR  state :DYNARRAY[] of CHAR;
  VAR  code :LONGINT;
  VAR  internalDesc :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBSQLExecuteError():
   return (BOOLEAN, message, state, code, internalDesc)

Description:

Return information about the last error occured in the ODBC API functions.



  DBSQLExecuteGet ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBSQLExecuteGet
(   resultSetInst :LONGINT;
    colIndex :LONGINT;
  VAR  outColumnName :DYNARRAY[] of CHAR;
  VAR  outValue :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.DBSQLExecuteGet(resultSetInst, colIndex):
   return (BOOLEAN, outColumnName, outValue)

Description:

Retrieves information from the resultSetInstance created with 'DBSQLExecute' or 'DBSQLExecuteDSN'



  DBSQLExecuteNext ODBC 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   DBSQLExecuteNext
( resultSetInst:LONGINT ) :BOOLEAN ;

Python:

def  vs.DBSQLExecuteNext(resultSetInst):
   return BOOLEAN

Description:

Moves the resultSet current pointer to the next entry.