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.h File Reference

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

#include "vibdefines.h"
#include "vibtypes.h"
#include "vibdatabase.h"
#include "vibtransaction.h"
#include "vibstring.h"

Go to the source code of this file.

Classes

struct  VIBSQL
 Wrapper for a TIBSQL instance. More...
 

Macros

#define VIB_SQL_VARYING   0x1c0
 
#define VIB_SQL_TEXT   0x1c4
 
#define VIB_SQL_DOUBLE   0x1e0
 
#define VIB_SQL_FLOAT   0x1e2
 
#define VIB_SQL_LONG   0x1f0
 
#define VIB_SQL_SHORT   0x1f4
 
#define VIB_SQL_TIMESTAMP   0x1fe
 
#define VIB_SQL_BLOB   0x208
 
#define VIB_SQL_D_FLOAT   0x212
 
#define VIB_SQL_ARRAY   0x21c
 
#define VIB_SQL_QUAD   0x226
 
#define VIB_SQL_TYPE_TIME   0x230
 
#define VIB_SQL_TYPE_DATE   0x23a
 
#define VIB_SQL_INT64   0x244
 
#define VIB_SQL_DATE   0x1fe
 

Functions

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

VIBDLLFUNC 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.
VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_GetGenerateParamNames ( VIBSQL vsql)

Get the GenerateParamNames property.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_GetGoToFirstRecordOnExecute ( VIBSQL vsql)

Get the GoToFirstRecordOnExecute property.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_GetParamCheck ( VIBSQL vsql)

Get the ParamCheck property.

VIBDLLFUNC VIBTransaction* VIBCALL VIBSQL_GetTransaction ( VIBSQL vsql)

Get this query's transaction.

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

Obtain the InterBase handle for the query.

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

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

VIBDLLFUNC 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.

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

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

VIBDLLFUNC VIBString* VIBCALL VIBSQL_Plan ( VIBSQL vsql)

Obtain a plan for the SQL query.

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

Prepare the query; a plan can be obtained afterward.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_Prepared ( VIBSQL vsql)

Test if the query has been prepared.

VIBDLLFUNC int VIBCALL VIBSQL_RowsAffected ( VIBSQL vsql)

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

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_SetDatabase ( VIBSQL vsql,
VIBDatabase Database 
)

Set the database for this query.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_SetGenerateParamNames ( VIBSQL vsql,
VIBBOOL  GenerateParamNames 
)

Set the GenerateParamNames property.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_SetGoToFirstRecordOnExecute ( VIBSQL vsql,
VIBBOOL  GoToFirstRecordOnExecute 
)

Set the GoToFirstRecordOnExecute property.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_SetParamCheck ( VIBSQL vsql,
VIBBOOL  ParamCheck 
)

Set the ParamCheck property.

VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_SetTransaction ( VIBSQL vsql,
VIBTransaction Transaction 
)

Set this query's transaction.

VIBDLLFUNC 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.
VIBDLLFUNC VIBBOOL VIBCALL VIBSQL_SQL_SetText ( VIBSQL vsql,
const char *  Text 
)

Set the SQL Text property.

VIBDLLFUNC VIBSQLTypes VIBCALL VIBSQL_SQLType ( VIBSQL vsql)

Obtain the type of SQL query.

VIBDLLFUNC void*** VIBCALL VIBSQL_TRHandle ( VIBSQL vsql)

Obtain the InterBase TR handle for the query.

VIBDLLFUNC VIBString* VIBCALL VIBSQL_UniqueRelationName ( VIBSQL vsql)

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