sprint 1-alpha
|
Un Wrapper C++ verso ODBC. More...
#include <odbc.h>
Public Member Functions | |
bool | connect (const char *provider, const char *username, const char *password) |
bool | connect (const char *InConnectionString) |
bool | disconnect () |
Disconnect before new connection. | |
bool | begin_query (const char *query) |
void | end_query () |
Termina una query. | |
bool | next () |
template<class T > | |
bool | get (unsigned int col, T *value) |
bool | get (unsigned int col, char *buf, unsigned int buf_len) |
bool | good () const |
La connessione e' valida? |
Un Wrapper C++ verso ODBC.
bool sprint::odbc::begin_query | ( | const char * | query | ) |
Inizia una query
BeginQuery("SELECT");
bool sprint::odbc::connect | ( | const char * | provider, |
const char * | username, | ||
const char * | password | ||
) |
Connect using SQLConnect
db.connect("DNS","USERNAME","PASSWORD");
bool sprint::odbc::connect | ( | const char * | InConnectionString | ) |
Connnect using SQLDriverConnect
// connessione a DB Access db.connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\\pippo.mdb;"); // connessione a DB SQL db.connect("TODO");
bool sprint::odbc::get | ( | unsigned int | col, |
char * | buf, | ||
unsigned int | buf_len | ||
) |
Ritorna la colonna col per un buffer di testo
col | colonna |
buf | un buffer da riempire |
buf_len | la dimensione del buffer |
bool sprint::odbc::get | ( | unsigned int | col, |
T * | value | ||
) |
Ritorna la colonna col
col | colonna del record |
value | puntatore a un valore da riempire |
bool sprint::odbc::next | ( | ) |
Avanza al prossimo record della query