| 21 |
* Boston, MA 02111-1307, USA gnu@gnu.org * |
* Boston, MA 02111-1307, USA gnu@gnu.org * |
| 22 |
\********************************************************************/ |
\********************************************************************/ |
| 23 |
|
|
| 24 |
/* |
/** |
| 25 |
* FUNCTION: |
@file dui-odbc.c |
| 26 |
* ODBC driver -- developed/tested with iODBC http://www.iodbc.org |
@brief ODBC driver -- developed/tested with iODBC http://www.iodbc.org |
| 27 |
* |
@author 2002 Linas Vepstas <linas@linas.org> |
| 28 |
|
|
| 29 |
|
@{ |
| 30 |
* ODBC is basically brain-damaged, and so is this driver. |
* ODBC is basically brain-damaged, and so is this driver. |
| 31 |
* The problem is that ODBC forces you to guess how many columns there |
* The problem is that ODBC forces you to guess how many columns there |
| 32 |
* are in your reply, and etc. which we don't know a-priori. Also |
* are in your reply, and etc. which we don't know a-priori. Also |
| 33 |
* makes VARCHAR difficult (impossible ??) to support correctly! |
* makes VARCHAR difficult (impossible ??) to support correctly! |
| 34 |
* Blame it on SQLBindCol(), which is a terrible idea. @#$%^ Microsoft. |
* Blame it on SQLBindCol(), which is a terrible idea. |
| 35 |
* |
*/ |
|
* HISTORY: |
|
|
* Copyright (c) 2002 Linas Vepstas <linas@linas.org> |
|
|
* created by Linas Vepstas March 2002 |
|
|
*/ |
|
| 36 |
|
|
| 37 |
#include "config.h" |
#include "config.h" |
| 38 |
#include "perr.h" |
#include "perr.h" |
| 368 |
} |
} |
| 369 |
|
|
| 370 |
LEAVE ("(conn=%p, buff=%s)", conn, buff); |
LEAVE ("(conn=%p, buff=%s)", conn, buff); |
| 371 |
/* Use numbr of columns to indicate that the query hasn't |
/* Use number of columns to indicate that the query hasn't |
| 372 |
* given results yet. */ |
* given results yet. */ |
| 373 |
rs->ncols = -1; |
rs->ncols = -1; |
| 374 |
return &rs->recset; |
return &rs->recset; |
| 401 |
} |
} |
| 402 |
|
|
| 403 |
LEAVE ("(conn=%p)", conn); |
LEAVE ("(conn=%p)", conn); |
| 404 |
/* Use numbr of columns to indicate that the query hasn't |
/* Use number of columns to indicate that the query hasn't |
| 405 |
* given results yet. */ |
* given results yet. */ |
| 406 |
rs->ncols = -1; |
rs->ncols = -1; |
| 407 |
return &rs->recset; |
return &rs->recset; |
| 436 |
} |
} |
| 437 |
|
|
| 438 |
LEAVE ("(conn=%p, table=%s)", conn, tablename); |
LEAVE ("(conn=%p, table=%s)", conn, tablename); |
| 439 |
/* Use numbr of columns to indicate that the query hasn't |
/* Use number of columns to indicate that the query hasn't |
| 440 |
* given results yet. */ |
* given results yet. */ |
| 441 |
rs->ncols = -1; |
rs->ncols = -1; |
| 442 |
return &rs->recset; |
return &rs->recset; |
| 535 |
static gint |
static gint |
| 536 |
dui_odbc_recordset_rewind (DuiDBRecordSet *recset) |
dui_odbc_recordset_rewind (DuiDBRecordSet *recset) |
| 537 |
{ |
{ |
| 538 |
/* XXX implement me */ |
/** @todo implement me */ |
| 539 |
/* DuiODBCRecordSet *rs = (DuiODBCRecordSet *) recset; */ |
/* DuiODBCRecordSet *rs = (DuiODBCRecordSet *) recset; */ |
| 540 |
|
|
| 541 |
return dui_odbc_recordset_fetch_row (recset); |
return dui_odbc_recordset_fetch_row (recset); |
| 635 |
plg = dui_odbc_plugin_new(); |
plg = dui_odbc_plugin_new(); |
| 636 |
dui_db_provider_register (plg); |
dui_db_provider_register (plg); |
| 637 |
#else |
#else |
| 638 |
|
/** @todo translatable string not marked up */ |
| 639 |
PERR ("The DWI db drivers were compiled without ODBC support"); |
PERR ("The DWI db drivers were compiled without ODBC support"); |
| 640 |
#endif /* USE_ODBC */ |
#endif /* USE_ODBC */ |
| 641 |
} |
} |
| 642 |
|
|
| 643 |
|
/** @} */ |
| 644 |
|
|
| 645 |
/* ============================= END OF FILE ================= */ |
/* ============================= END OF FILE ================= */ |
| 646 |
|
|