Database (ODBC) Functions

Aurora has a number of Database functions included as standard compiler and library functions. These functions can be grouped as follows:







under construction







top of page

prev

next







//DATE/TIME structs. Identical to SQL types struct DBDATE { WORD year; WORD month; WORD day; } struct DBTIME { WORD hour; WORD minute; WORD second; } struct DBTIMESTAMP { WORD year; WORD month; WORD day; WORD hour; WORD minute; WORD second; INT fraction; } class CDatabase { declare BindDate(hstmt as INT,column as INT,date as DBDATE,opt pReturn = NULL as POINTER),INT; declare BindDateParam(hstmt as INT,param as INT,dt as DBDATE),INT; declare BindParameter(int hstmt,int param,pointer variable,int type,opt int cbSize=0,opt pointer pReturn=NULL),INT; declare BindTime(hstmt as INT,column as INT,time as DBTIME,opt pReturn = NULL as POINTER),INT; declare BindTimeParam(hstmt as INT,param as INT,tm as DBTIME),INT; declare BindTimeStamp(hstmt as INT,column as INT,timestamp as DBTIMESTAMP,opt pReturn = NULL as POINTER),INT; declare BindTimeStampParam(hstmt as INT,param as INT,ts as DBTIMESTAMP),INT; declare BindVariable(int hstmt,int column,pointer variable,int type,opt pointer pReturn=NULL,opt int cbSize=255),INT; declare Cardinality(string tablename),int; declare CreateMDB(path as STRING),INT; declare Connect(string Driver,string filename,string options,OPT parwnd=NULL as pointer),int; declare ConnectDSN(string DSNname,string options,OPT parwnd=NULL as pointer),int; declare Disconnect(),int; declare EnumDrivers(),POINTER; //returns a pointer to a CStringList object declare ExecSQL(string statement),INT; declare Execute(unsigned int hstmt),INT; declare FreeSQL(hstmt as INT); declare Get(hstmt as INT),INT; declare GetData(int hstmt,int column,pointer variable,int type,opt int cbSize=255),INT; declare GetDate(hstmt as INT,column as INT,date as DBDATE),INT; declare GetErrorCode(hstmt as INT),STRING; declare GetErrorText(hstmt as INT),STRING; declare GetTime(hstmt as INT,column as INT,time as DBTIME),INT; declare GetTimeStamp(hstmt as INT,column as INT,timestamp as DBTIMESTAMP),INT; declare GetFirst(hstmt as INT),INT; declare GetLast(hstmt as INT),INT; declare GetNext(hstmt as INT),INT; declare GetNumCols(hstmt as INT),INT; declare GetPrev(hstmt as INT),INT; declare IsNull(hstmt as INT,column as INT),INT; declare ListColumns(tableName as STRING,OPT hStmt=NULL as INT ),POINTER; //returns a pointer to a CStringList object declare ListTables(),POINTER; //returns a pointer to a CStringList object declare PrepareSQL(STRING statement),INT; int m_hEnv; int m_hDbc; }