|
virtual int | IsA (const char *type) |
|
vtkODBCDatabase * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) |
|
bool | Open (const char *password) |
|
void | Close () |
|
bool | IsOpen () |
|
vtkSQLQuery * | GetQueryInstance () |
|
const char * | GetLastErrorText () |
|
vtkStringArray * | GetTables () |
|
vtkStringArray * | GetRecord (const char *table) |
|
bool | IsSupported (int feature) |
|
virtual void | SetServerPort (int) |
|
virtual void | SetHostName (const char *) |
|
virtual void | SetUserName (const char *) |
|
virtual void | SetDatabaseName (const char *) |
|
virtual char * | GetDatabaseName () |
|
virtual void | SetPassword (const char *) |
|
bool | HasError () |
|
vtkStdString | GetURL () |
|
bool | CreateDatabase (const char *dbName, bool dropExisting) |
|
bool | DropDatabase (const char *dbName) |
|
bool | ParseURL (const char *url) |
|
|
virtual void | SetDataSourceName (const char *) |
|
virtual char * | GetDataSourceName () |
|
|
virtual char * | GetDatabaseType () |
|
|
virtual vtkStdString | GetColumnSpecification (vtkSQLDatabaseSchema *schema, int tblHandle, int colHandle) |
|
|
virtual vtkStdString | GetIndexSpecification (vtkSQLDatabaseSchema *schema, int tblHandle, int idxHandle, bool &skipped) |
|
vtkSQLDatabase * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) |
|
virtual bool | IsSupported (int vtkNotUsed(feature)) |
|
virtual vtkStdString | GetTablePreamble (bool) |
|
virtual bool | EffectSchema (vtkSQLDatabaseSchema *, bool dropIfExists=false) |
|
virtual vtkStdString | GetTriggerSpecification (vtkSQLDatabaseSchema *schema, int tblHandle, int trgHandle) |
|
vtkObject * | NewInstance () const |
|
virtual void | DebugOn () |
|
virtual void | DebugOff () |
|
bool | GetDebug () |
|
void | SetDebug (bool debugFlag) |
|
virtual void | Modified () |
|
virtual unsigned long | GetMTime () |
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
int | HasObserver (unsigned long event, vtkCommand *) |
|
int | HasObserver (const char *event, vtkCommand *) |
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
int | HasObserver (unsigned long event) |
|
int | HasObserver (const char *event) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
int | InvokeEvent (unsigned long event, void *callData) |
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
|
virtual void | Delete () |
|
virtual void | FastDelete () |
|
void | Print (ostream &os) |
|
virtual void | Register (vtkObjectBase *o) |
|
virtual void | UnRegister (vtkObjectBase *o) |
|
void | SetReferenceCount (int) |
|
void | PrintRevisions (ostream &) |
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
int | GetReferenceCount () |
|
maintain an ODBC connection to a SQL database
ODBC is a standard for connecting to an SQL database regardless of vendor or implementation. In order to make it work you need two separate pices of software: a driver manager and then a database-specific driver. On Windows, the driver manager is built into the OS. On Unix platforms, the open-source packages iODBC and unixODBC will do the job. Mac OS X has its own driver manager and can also use the open-source packages. Database-specific drivers must be obtained from the entity that makes the database(s) you use.
Unlike the other VTK database drivers, ODBC can read its parameters from a configuration file (odbc.ini). That file can define an entire set of connection parameters and give it a single name called a data source name (DSN). Writing and maintaining odbc.ini files is beyond the scope of this header file.
- Warning
- The password supplied as an argument to the Open call will override whatever password is set (if any) in the DSN definition. To use the password from the DSN definition, pass in NULL for the password argument.
-
Also, vtkSQLDatabase::CreateFromURL() will only handle URLs of the following form for ODBC:
-
odbc://[user@]datsourcename[:port]/[dbname]
-
Anything more complicated than that needs to be set up manually.
-
Finally, this class does not yet support the schema API present in the SQLite, MySQL and PostgreSQL drivers. Those functions will be added once the bare-bones driver has been successfully integrated into VTK.
- See also
- vtkODBCQuery
- Tests:
- vtkODBCDatabase (Tests)
Definition at line 85 of file vtkODBCDatabase.h.