fprintf(stderr,
"Wrong value, got \"%s\" expected \"%s\"\n",
value,
expected);
29fprintf(stderr,
"Wrong value, got \"%s\" expected to contains \"%s\"\n",
value,
expected);
33 main(
intargc,
char**argv)
44printf(
"Starting %s\n", argv[0]);
51printf(
"About to logon\n");
58printf(
"About to open\n");
65printf(
"creating tables\n");
76printf(
"Was expecting a result set.");
80 for(n_col = 1; n_col <= 3; ++n_col) {
81 col2.SizeOfStruct =
sizeof(
col2);
83fprintf(stderr,
"dbtablecolinfo failed for col %d\n", n_col);
91}
else if(n_col == 2) {
94}
else if(n_col == 3) {
102printf(
"%s %s\n", __FILE__, (
failed?
"failed!":
"OK"));
int main(int argc, char **argv)
static void check_is(const char *value, const char *expected)
static void check_contains(const char *value, const char *expected)
CS_RETCODE read_login_info(void)
int syb_err_handler(DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
RETCODE sql_cmd(DBPROCESS *dbproc)
int syb_msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line)
void set_malloc_options(void)
static DBPROCESS * dbproc
static const char * expected[]
#define DBSETLPWD(x, y)
Set the password in the login packet.
#define DBSETLAPP(x, y)
Set the (client) application name in the login packet.
#define DBSETLUSER(x, y)
Set the username in the login packet.
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
RETCODE dbinit(void)
Initialize db-lib.
RETCODE dbuse(DBPROCESS *dbproc, const char *name)
Change current database.
RETCODE dbtablecolinfo(DBPROCESS *dbproc, DBINT column, DBCOL *pdbcol)
describe table column attributes with a single call (Freetds-only API function modelled on dbcolinfo)
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
void dbloginfree(LOGINREC *login)
free the LOGINREC
void dbexit()
Close server connections and free all related structures.
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
const GenericPointer< typename T::ValueType > T2 value
int strcmp(const char *str1, const char *str2)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4