VisualIB  1.0
IBExpress library for making use of Borland IBExpress outside of C++Builder
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
vibsql.cpp File Reference

VisualIB - InterBase wrapper for use in Visual Studio. More...

#include "vibinlines.h"
#include "vibexception.h"
#include "vibstring.h"

Functions

VIBSQL *VIBCALL VIBSQL_New ()
 Constructor.
 
void VIBCALL VIBSQL_Destroy (VIBSQL *vsql)
 Destructor.
 
VIBBOOL VIBCALL VIBSQL_Call (VIBSQL *vsql, int ErrCode, VIBBOOL RaiseError, int *ret)
 Execute an InterBase API call.
 
VIBBOOL VIBCALL VIBSQL_CheckClosed (VIBSQL *vsql)
 Check if is closed.
 
VIBBOOL VIBCALL VIBSQL_CheckOpen (VIBSQL *vsql)
 Check if is open.
 
VIBBOOL VIBCALL VIBSQL_CheckValidStatement (VIBSQL *vsql)
 Check if statement is valid.
 
VIBBOOL VIBCALL VIBSQL_Close (VIBSQL *vsql)
 Close the SQL query object.
 
VIBBOOL VIBCALL VIBSQL_ExecQuery (VIBSQL *vsql)
 Execute the query.
 
VIBBOOL VIBCALL VIBSQL_FreeHandle (VIBSQL *vsql)
 Free the query's InterBase handle.
 
VIBBOOL VIBCALL VIBSQL_Prepare (VIBSQL *vsql)
 Prepare the query; a plan can be obtained afterward.
 
VIBString *VIBCALL VIBSQL_GetUniqueRelationName (VIBSQL *vsql)
 Get the query's unique relation name.
 
VIBBOOL VIBCALL VIBSQL_Bof (VIBSQL *vsql)
 Test for BOF.
 
void ***VIBCALL VIBSQL_DBHandle (VIBSQL *vsql)
 Obtain the InterBase DB handle.
 
VIBBOOL VIBCALL VIBSQL_Eof (VIBSQL *vsql)
 Test for EOF.
 
VIBBOOL VIBCALL VIBSQL_FieldIndex (VIBSQL *vsql, const char *FieldName, int *ret)
 Get an index for a fieldname.
 
VIBBOOL VIBCALL VIBSQL_Open (VIBSQL *vsql)
 Open the SQL query.
 
VIBBOOL VIBCALL VIBSQL_Params_ByName_SetIsNull (VIBSQL *vsql, const char *name, VIBBOOL IsNull)
 Find a SQL parameter by name as set its IsNull property.
 
VIBBOOL VIBCALL VIBSQL_Params_ByName_SetAsString (VIBSQL *vsql, const char *name, const char *str)
 Find a SQL parameter by name and set its value using AsString.
 
int VIBCALL VIBSQL_Params_ByName_GetSQLType (VIBSQL *vsql, const char *name)
 Find a SQL parameter by name and retrieve its InterBase SQL type.
 
VIBString *VIBCALL VIBSQL_Plan (VIBSQL *vsql)
 Obtain a plan for the SQL query.
 
VIBBOOL VIBCALL VIBSQL_Prepared (VIBSQL *vsql)
 Test if the query has been prepared.
 
int VIBCALL VIBSQL_RecordCount (VIBSQL *vsql)
 Get the number of records returned by this query.
 
int VIBCALL VIBSQL_RowsAffected (VIBSQL *vsql)
 Get the number of database table rows affected by this query.
 
VIBSQLTypes VIBCALL VIBSQL_SQLType (VIBSQL *vsql)
 Obtain the type of SQL query.
 
void ***VIBCALL VIBSQL_TRHandle (VIBSQL *vsql)
 Obtain the InterBase TR handle for the query.
 
void **VIBCALL VIBSQL_Handle (VIBSQL *vsql)
 Obtain the InterBase handle for the query.
 
VIBBOOL VIBCALL VIBSQL_GetGenerateParamNames (VIBSQL *vsql)
 Get the GenerateParamNames property.
 
VIBBOOL VIBCALL VIBSQL_SetGenerateParamNames (VIBSQL *vsql, VIBBOOL GenerateParamNames)
 Set the GenerateParamNames property.
 
VIBString *VIBCALL VIBSQL_UniqueRelationName (VIBSQL *vsql)
 Get the unique relation name via the TIBSQL::UniqueRelationName property.
 
VIBDatabase *VIBCALL VIBSQL_GetDatabase (VIBSQL *vsql)
 Obtain the database this query is targeting.
 
VIBBOOL VIBCALL VIBSQL_SetDatabase (VIBSQL *vsql, VIBDatabase *Database)
 Set the database for this query.
 
VIBBOOL VIBCALL VIBSQL_GetGoToFirstRecordOnExecute (VIBSQL *vsql)
 Get the GoToFirstRecordOnExecute property.
 
VIBBOOL VIBCALL VIBSQL_SetGoToFirstRecordOnExecute (VIBSQL *vsql, VIBBOOL GoToFirstRecordOnExecute)
 Set the GoToFirstRecordOnExecute property.
 
VIBBOOL VIBCALL VIBSQL_GetParamCheck (VIBSQL *vsql)
 Get the ParamCheck property.
 
VIBBOOL VIBCALL VIBSQL_SetParamCheck (VIBSQL *vsql, VIBBOOL ParamCheck)
 Set the ParamCheck property.
 
VIBBOOL VIBCALL VIBSQL_SQL_SetText (VIBSQL *vsql, const char *Text)
 Set the SQL Text property.
 
VIBString *VIBCALL VIBSQL_SQL_GetText (VIBSQL *vsql)
 Get the SQL Text property.
 
VIBTransaction *VIBCALL VIBSQL_GetTransaction (VIBSQL *vsql)
 Get this query's transaction.
 
VIBBOOL VIBCALL VIBSQL_SetTransaction (VIBSQL *vsql, VIBTransaction *Transaction)
 Set this query's transaction.
 

Detailed Description

VisualIB - InterBase wrapper for use in Visual Studio.

TIBSQL Wrapper

Author
James Haley

Function Documentation

VIBDatabase* VIBCALL VIBSQL_GetDatabase ( VIBSQL vsql)

Obtain the database this query is targeting.

Warning
You must destroy the VIBDatabase instance when you are finished with it.
VIBBOOL VIBCALL VIBSQL_GetGenerateParamNames ( VIBSQL vsql)

Get the GenerateParamNames property.

VIBBOOL VIBCALL VIBSQL_GetGoToFirstRecordOnExecute ( VIBSQL vsql)

Get the GoToFirstRecordOnExecute property.

VIBBOOL VIBCALL VIBSQL_GetParamCheck ( VIBSQL vsql)

Get the ParamCheck property.

VIBTransaction* VIBCALL VIBSQL_GetTransaction ( VIBSQL vsql)

Get this query's transaction.

Warning
You must destroy the VIBTransaction when you are finished with it.
void** VIBCALL VIBSQL_Handle ( VIBSQL vsql)

Obtain the InterBase handle for the query.

int VIBCALL VIBSQL_Params_ByName_GetSQLType ( VIBSQL vsql,
const char *  name 
)

Find a SQL parameter by name and retrieve its InterBase SQL type.

VIBBOOL VIBCALL VIBSQL_Params_ByName_SetAsString ( VIBSQL vsql,
const char *  name,
const char *  str 
)

Find a SQL parameter by name and set its value using AsString.

VIBBOOL VIBCALL VIBSQL_Params_ByName_SetIsNull ( VIBSQL vsql,
const char *  name,
VIBBOOL  IsNull 
)

Find a SQL parameter by name as set its IsNull property.

VIBString* VIBCALL VIBSQL_Plan ( VIBSQL vsql)

Obtain a plan for the SQL query.

Precondition
The query must be prepared first.
VIBBOOL VIBCALL VIBSQL_Prepare ( VIBSQL vsql)

Prepare the query; a plan can be obtained afterward.

VIBBOOL VIBCALL VIBSQL_Prepared ( VIBSQL vsql)

Test if the query has been prepared.

int VIBCALL VIBSQL_RowsAffected ( VIBSQL vsql)

Get the number of database table rows affected by this query.

VIBBOOL VIBCALL VIBSQL_SetDatabase ( VIBSQL vsql,
VIBDatabase Database 
)

Set the database for this query.

VIBBOOL VIBCALL VIBSQL_SetGenerateParamNames ( VIBSQL vsql,
VIBBOOL  GenerateParamNames 
)

Set the GenerateParamNames property.

VIBBOOL VIBCALL VIBSQL_SetGoToFirstRecordOnExecute ( VIBSQL vsql,
VIBBOOL  GoToFirstRecordOnExecute 
)

Set the GoToFirstRecordOnExecute property.

VIBBOOL VIBCALL VIBSQL_SetParamCheck ( VIBSQL vsql,
VIBBOOL  ParamCheck 
)

Set the ParamCheck property.

VIBBOOL VIBCALL VIBSQL_SetTransaction ( VIBSQL vsql,
VIBTransaction Transaction 
)

Set this query's transaction.

VIBString* VIBCALL VIBSQL_SQL_GetText ( VIBSQL vsql)

Get the SQL Text property.

Warning
You must destroy the VIBString instanced when you are finished with it.
VIBBOOL VIBCALL VIBSQL_SQL_SetText ( VIBSQL vsql,
const char *  Text 
)

Set the SQL Text property.

VIBSQLTypes VIBCALL VIBSQL_SQLType ( VIBSQL vsql)

Obtain the type of SQL query.

void*** VIBCALL VIBSQL_TRHandle ( VIBSQL vsql)

Obtain the InterBase TR handle for the query.

VIBString* VIBCALL VIBSQL_UniqueRelationName ( VIBSQL vsql)

Get the unique relation name via the TIBSQL::UniqueRelationName property.