1 #ifndef _WX_DATABASE_ODBC_H_ 2 #define _WX_DATABASE_ODBC_H_ 8 #define ERR_BUFFER_LEN 1024 9 #define ERR_STATE_LEN 10 23 virtual bool Open(
const wxString& strConnection);
24 virtual bool Open(
const wxString& strDSN,
const wxString& strUser,
const wxString& strPassword);
26 virtual bool Open(
const wxString& strConnection,
bool bPromptForInfo, wxWindow* parent = NULL);
41 virtual int RunQuery(
const wxString& strQuery,
bool bParseQuery);
52 virtual wxArrayString
GetColumns(
const wxString& table);
53 virtual wxArrayString
GetPKColumns(
const wxString& table);
55 static bool IsAvailable();
82 void InterpretErrorCodes(
long nCode,
void* stmth_ptr = NULL );
88 #endif//_WX_DATABASE_ODBC_H_
virtual wxArrayString GetPKColumns(const wxString &table)=0
get Primary keys column names
virtual wxArrayString GetViews()=0
Retrieve all view names.
wxOdbcInterface * m_pInterface
virtual wxPreparedStatement * PrepareStatement(const wxString &strQuery)=0
Prepare a SQL statement which can be reused with different parameters.
virtual void RollBack()=0
Rollback the current transaction.
virtual bool IsOpen()=0
Is the connection to the database open?
virtual int RunQuery(const wxString &strQuery)
Run an insert, update, or delete query on the database.
virtual void BeginTransaction()=0
Begin a transaction.
virtual bool Open(const wxString &strDatabase)=0
virtual bool ViewExists(const wxString &view)=0
Check for the existence of a view by name.
virtual void Commit()=0
Commit the current transaction.
virtual wxArrayString GetColumns(const wxString &table)=0
Retrieve all column names for a table.
virtual bool Close()=0
close database
virtual bool TableExists(const wxString &table)=0
Check for the existence of a table by name.
#define WXDLLIMPEXP_DATABASE
virtual wxArrayString GetTables()=0
Retrieve all table names.
virtual wxDatabaseResultSet * RunQueryWithResults(const wxString &strQuery)=0
Run a select query on the database.