NCBI C++ ToolKit
rpc.c
Go to the documentation of this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

Go to the SVN repository for this file.

1 /*
2  * Purpose: Test remote procedure calls
3  * Functions: dbretdata dbretlen dbretname dbretstatus dbrettype dbrpcinit dbrpcparam dbrpcsend
4  */
5 
6 #include "common.h"
7 
8 #include <common/test_assert.h>
9 
10 static RETCODE init_proc(DBPROCESS * dbproc, const char *name);
11 int ignore_err_handler(DBPROCESS * dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr);
12 int ignore_msg_handler(DBPROCESS * dbproc, DBINT msgno, int state, int severity, char *text, char *server, char *proc, int line);
13 
14 typedef struct {
15  char *name, *value;
16  int type, len;
17 } RETPARAM;
18 
19 static RETPARAM* save_retparam(RETPARAM *param, char *name, char *value, int type, int len);
20 
21 static RETCODE
22 init_proc(DBPROCESS * dbproc, const char *name)
23 {
24  RETCODE ret = FAIL;
25 
26  if (name[0] != '#') {
27  fprintf(stdout, "Dropping procedure %s\n", name);
28  sql_cmd(dbproc);
30  while (dbresults(dbproc) != NO_MORE_RESULTS) {
31  /* nop */
32  }
33  }
34 
35  fprintf(stdout, "Creating procedure %s\n", name);
36  sql_cmd(dbproc);
37  if ((ret = dbsqlexec(dbproc)) == FAIL) {
38  if (name[0] == '#')
39  fprintf(stdout, "Failed to create procedure %s. Wrong permission or not MSSQL.\n", name);
40  else
41  fprintf(stdout, "Failed to create procedure %s. Wrong permission.\n", name);
42  }
43  while (dbresults(dbproc) != NO_MORE_RESULTS) {
44  /* nop */
45  }
46  return ret;
47 }
48 
49 static RETPARAM*
50 save_retparam(RETPARAM *param, char *name, char *value, int type, int len)
51 {
52  free(param->name);
53  free(param->value);
54 
55  param->name = strdup(name);
56  param->value = strdup(value);
57 
58  param->type = type;
59  param->len = len;
60 
61  return param;
62 }
63 
64 static void
66 {
67  free(param->name);
68  free(param->value);
69  param->name = param->value = NULL;
70 }
71 
72 int
73 ignore_msg_handler(DBPROCESS * dbproc, DBINT msgno, int state, int severity, char *text, char *server, char *proc, int line)
74 {
75  int ret;
76 
77  dbsetuserdata(dbproc, (BYTE*) &msgno);
78  /* printf("(ignoring message %d)\n", msgno); */
79  ret = syb_msg_handler(dbproc, msgno, state, severity, text, server, proc, line);
81  return ret;
82 }
83 /*
84  * The bad procedure name message has severity 15, causing db-lib to call the error handler after calling the message handler.
85  * This wrapper anticipates that behavior, and again sets the userdata, telling the handler this error is expected.
86  */
87 int
88 ignore_err_handler(DBPROCESS * dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
89 {
90  int erc;
91  static int recursion_depth = 0;
92 
93  if (dbproc == NULL) {
94  printf("expected error %d: \"%s\"\n", dberr, dberrstr? dberrstr : "");
95  return INT_CANCEL;
96  }
97 
98  if (recursion_depth++) {
99  printf("error %d: \"%s\"\n", dberr, dberrstr? dberrstr : "");
100  printf("logic error: recursive call to ignore_err_handler\n");
101  exit(1);
102  }
103  dbsetuserdata(dbproc, (BYTE*) &dberr);
104  /* printf("(ignoring error %d)\n", dberr); */
105  erc = syb_err_handler(dbproc, severity, dberr, oserr, dberrstr, oserrstr);
107  recursion_depth--;
108  return erc;
109 }
110 
111 static int
112 colwidth( DBPROCESS * dbproc, int icol )
113 {
114  int width = dbwillconvert(dbcoltype(dbproc, icol), SYBCHAR);
115  return 255 == width? dbcollen(dbproc, icol) : width;
116 }
117 
118 char param_data1[64], param_data3[8000+1], param_data4[2 * 4000 + 1];
120 
121 struct parameters_t {
122  char *name;
124  int type;
128 } bindings[] =
129  { { "@null_input", DBRPCRETURN, SYBCHAR, -1, 0, NULL }
130  , { "@first_type", DBRPCRETURN, SYBCHAR, sizeof(param_data1), 0, (BYTE *) &param_data1 }
131  , { "@nullout", DBRPCRETURN, SYBINT4, -1, 0, (BYTE *) &param_data2 }
132  , { "@varchar_tds7_out", DBRPCRETURN, SYBVARCHAR, sizeof(param_data3), 0, (BYTE *) &param_data3 }
133  , { "@nvarchar_tds7_out", DBRPCRETURN, 231, sizeof(param_data4), 0, (BYTE *) &param_data4 }
134  , { "@nrows", DBRPCRETURN, SYBINT4, -1, -1, (BYTE *) &param_data5 }
135  , { "@c_this_name_is_way_more_than_thirty_characters_charlie",
136  0, SYBVARCHAR, 0, 0, NULL }
137  , { "@nv", 0, SYBVARCHAR, -1, 2, (BYTE *) "OK:" }
138  }, *pb = bindings;
139 
140 int
141 main(int argc, char **argv)
142 {
143  LOGINREC *login;
144  DBPROCESS *dbproc;
145  RETPARAM save_param, save_varchar_tds7_param, save_nvarchar_tds7_param;
146 
147  char teststr[8000+1], abbrev_data[10+3+1], *output;
148  char *retname = NULL;
149  int i, failed = 0;
150  int rettype = 0, retlen = 0, return_status = 0;
151  char proc[] = "#t0022";
152  char *proc_name = proc;
153 
154  int num_resultset = 0, num_empty_resultset = 0;
155  int num_params = 6;
156 
157  static const char dashes30[] = "------------------------------";
158  static const char *dashes5 = dashes30 + (sizeof(dashes30) - 5),
159  *dashes20 = dashes30 + (sizeof(dashes30) - 20);
160 
161  RETCODE erc, row_code;
162 
164 
165  memset(&save_param, 0, sizeof(save_param));
166  memset(&save_varchar_tds7_param, 0, sizeof(save_varchar_tds7_param));
167  memset(&save_nvarchar_tds7_param, 0, sizeof(save_nvarchar_tds7_param));
168 
169  read_login_info(argc, argv);
170 
171  fprintf(stdout, "Starting %s\n", argv[0]);
172 
173  dbinit();
174 
177 
178  fprintf(stdout, "About to logon\n");
179 
180  login = dblogin();
183  DBSETLAPP(login, "rpc");
185  DBSETLPACKET(login, -1);
187 
188 
189  fprintf(stdout, "About to open %s.%s\n", SERVER, DATABASE);
190 
192  if (strlen(DATABASE))
195 
196  printf("Check if server support long identifiers\n");
197  sql_cmd(dbproc);
198  i = 103;
199  dbsetuserdata(dbproc, (BYTE*) &i);
200  dbsqlexec(dbproc);
201  while (dbresults(dbproc) != NO_MORE_RESULTS)
202  while (dbnextrow(dbproc) != NO_MORE_ROWS)
203  continue;
205  if (i == 0) {
206  fprintf(stderr, "This server does not support long identifiers\n");
207  dbexit();
208  return 0;
209  }
210 
213 
214  printf("trying to create a temporary stored procedure\n");
215  if (FAIL == init_proc(dbproc, proc_name)) {
216  num_params = 4;
217  printf("trying to create a permanent stored procedure\n");
218  if (FAIL == init_proc(dbproc, ++proc_name))
220  }
221 
224 
225  fprintf(stdout, "Created procedure %s\n", proc_name);
226 
227  /* set up and send the rpc */
228  printf("executing dbrpcinit\n");
229  erc = dbrpcinit(dbproc, proc_name, 0); /* no options */
230  if (erc == FAIL) {
231  fprintf(stderr, "Failed line %d: dbrpcinit\n", __LINE__);
232  failed = 1;
233  }
234 
235  for (pb = bindings, i = 0; pb < bindings + sizeof(bindings)/sizeof(bindings[0]); pb++, i++) {
236  printf("executing dbrpcparam for %s\n", pb->name);
237  if (num_params == 4 && (i == 3 || i == 4))
238  continue;
239  if ((erc = dbrpcparam(dbproc, pb->name, pb->status, pb->type, pb->maxlen, pb->datalen, pb->value)) == FAIL) {
240  fprintf(stderr, "Failed line %d: dbrpcparam\n", __LINE__);
241  failed++;
242  }
243 
244  }
245  printf("executing dbrpcsend\n");
246  param_data5 = 0x11223344;
247  erc = dbrpcsend(dbproc);
248  if (erc == FAIL) {
249  fprintf(stderr, "Failed line %d: dbrpcsend\n", __LINE__);
250  exit(1);
251  }
252 
253  /* wait for it to execute */
254  printf("executing dbsqlok\n");
255  erc = dbsqlok(dbproc);
256  if (erc == FAIL) {
257  fprintf(stderr, "Failed line %d: dbsqlok\n", __LINE__);
258  exit(1);
259  }
260 
261  /* retrieve outputs per usual */
262  printf("fetching results\n");
263  while ((erc = dbresults(dbproc)) != NO_MORE_RESULTS) {
264  printf("fetched resultset %d %s:\n", 1+num_resultset, erc==SUCCEED? "successfully":"unsuccessfully");
265  if (erc == SUCCEED) {
266  const int ncol = dbnumcols(dbproc);
267  int empty_resultset = 1, c;
268  enum {buflen=1024, nbuf=5};
269  char bound_buffers[nbuf][buflen] = { "one", "two", "three", "four", "five" };
270 
271  ++num_resultset;
272 
273  for( c=0; c < ncol && c < nbuf; c++ ) {
274  printf("column %d (%s) is %d wide, ", c+1, dbcolname(dbproc, c+1), colwidth(dbproc, c+1));
275  printf("buffer initialized to '%s'\n", bound_buffers[c]);
276  }
277  for( c=0; c < ncol && c < nbuf; c++ ) {
278  erc = dbbind(dbproc, c+1, STRINGBIND, 0, (BYTE *) bound_buffers[c]);
279  if (erc == FAIL) {
280  fprintf(stderr, "Failed line %d: dbbind\n", __LINE__);
281  exit(1);
282  }
283 
284  printf("%-*s ", colwidth(dbproc, c+1), dbcolname(dbproc, c+1));
285  }
286  printf("\n");
287 
288  while ((row_code = dbnextrow(dbproc)) != NO_MORE_ROWS) {
289  empty_resultset = 0;
290  if (row_code == REG_ROW) {
291  int c;
292  for( c=0; c < ncol && c < nbuf; c++ ) {
293  printf("%-*s ", colwidth(dbproc, c+1), bound_buffers[c]);
294  }
295  printf("\n");
296  } else {
297  /* not supporting computed rows in this unit test */
298  failed = 1;
299  fprintf(stderr, "Failed. Expected a row\n");
300  exit(1);
301  }
302  }
303  printf("row count %d\n", (int) dbcount(dbproc));
304  if (empty_resultset)
305  ++num_empty_resultset;
306  } else {
307  fprintf(stderr, "Expected a result set.\n");
308  exit(1);
309  }
310  } /* while dbresults */
311 
312  /* check return status */
313  printf("retrieving return status...\n");
314  if (dbhasretstat(dbproc) == TRUE) {
315  printf("%d\n", return_status = dbretstatus(dbproc));
316  } else {
317  printf("none\n");
318  }
319 
320  /*
321  * Check output parameter values
322  */
323  if (dbnumrets(dbproc) != num_params) { /* dbnumrets missed something */
324  fprintf(stderr, "Expected %d output parameters.\n", num_params);
325  exit(1);
326  }
327  printf("retrieving output parameters...\n");
328  printf("%-5s %-20s %5s %6s %-30s\n", "param", "name", "type", "length", "data");
329  printf("%-5s %-20s %5s %5s- %-30s\n", dashes5, dashes20, dashes5, dashes5, dashes30);
330  for (i = 1; i <= dbnumrets(dbproc); i++) {
332  rettype = dbrettype(dbproc, i);
333  retlen = dbretlen(dbproc, i);
334  dbconvert(dbproc, rettype, dbretdata(dbproc, i), retlen, SYBVARCHAR, (BYTE*) teststr, -1);
335  if(retlen <= 10) {
336  output = teststr;
337  } else {
338  memcpy(abbrev_data, teststr, 10);
339  sprintf(&abbrev_data[10], "...");
340  output = abbrev_data;
341  }
342  printf("%-5d %-20s %5d %6d %-30s\n", i, retname, rettype, retlen, output);
343 
344  save_retparam(&save_param, retname, teststr, rettype, retlen);
345  if (i == 4) {
346  save_retparam(&save_varchar_tds7_param, retname, teststr, rettype, retlen);
347  }
348  if (i == 5) {
349  save_retparam(&save_nvarchar_tds7_param, retname, teststr, rettype, retlen);
350  }
351  }
352 
353  /*
354  * Test the last parameter for expected outcome
355  */
356  if ((save_param.name == NULL) || strcmp(save_param.name, bindings[5].name)) {
357  fprintf(stderr, "Expected retname to be '%s', got ", bindings[5].name);
358  if (save_param.name == NULL)
359  fprintf(stderr, "<NULL> instead.\n");
360  else
361  fprintf(stderr, "'%s' instead.\n", save_param.name);
362  exit(1);
363  }
364  if (strcmp(save_param.value, "3")) {
365  fprintf(stderr, "Expected retdata to be 3.\n");
366  exit(1);
367  }
368  if (save_param.type != SYBINT4) {
369  fprintf(stderr, "Expected rettype to be SYBINT4 was %d.\n", save_param.type);
370  exit(1);
371  }
372  if (save_param.len != 4) {
373  fprintf(stderr, "Expected retlen to be 4.\n");
374  exit(1);
375  }
376 
377  if (num_params == 6) {
378  /*
379  * Test name, size, contents of the VARCHAR(8000) output parameter
380  */
381  if ((save_varchar_tds7_param.name == NULL) || strcmp(save_varchar_tds7_param.name, bindings[3].name)) {
382  fprintf(stderr, "Expected retname to be '%s', got ", bindings[3].name);
383  if (save_varchar_tds7_param.name == NULL)
384  fprintf(stderr, "<NULL> instead.\n");
385  else
386  fprintf(stderr, "'%s' instead.\n", save_varchar_tds7_param.name);
387  exit(1);
388  }
389  if (save_varchar_tds7_param.type != SYBVARCHAR) {
390  fprintf(stderr, "Expected rettype to be SYBVARCHAR was %d.\n", save_varchar_tds7_param.type);
391  exit(1);
392  }
393  if (save_varchar_tds7_param.len != 8000) {
394  fprintf(stderr, "Expected retlen to be 8000 was %d.\n", save_varchar_tds7_param.len);
395  exit(1);
396  }
397 
398  /*
399  * Test name, size, contents of the NVARCHAR(4000) output parameter
400  */
401  if ((save_nvarchar_tds7_param.name == NULL) || strcmp(save_nvarchar_tds7_param.name, bindings[4].name)) {
402  fprintf(stderr, "Expected retname to be '%s', got ", bindings[4].name);
403  if (save_varchar_tds7_param.name == NULL)
404  fprintf(stderr, "<NULL> instead.\n");
405  else
406  fprintf(stderr, "'%s' instead.\n", save_nvarchar_tds7_param.name);
407  exit(1);
408  }
409  if (save_nvarchar_tds7_param.len != 4000) {
410  fprintf(stderr, "Expected retlen to be 4000 was %d.\n", save_nvarchar_tds7_param.len);
411  exit(1);
412  }
413  }
414 
415  if(42 != return_status) {
416  fprintf(stderr, "Expected status to be 42.\n");
417  exit(1);
418  }
419 
420  printf("Good: Got 6 output parameters and 1 return status of %d.\n", return_status);
421 
422 
423  /* Test number of result sets */
424  if (num_resultset != 4) {
425  fprintf(stderr, "Expected 4 resultset got %d.\n", num_resultset);
426  exit(1);
427  }
428  if (num_empty_resultset != 1) {
429  fprintf(stderr, "Expected an empty resultset got %d.\n", num_empty_resultset);
430  exit(1);
431  }
432  printf("Good: Got %d resultsets and %d empty resultset.\n", num_resultset, num_empty_resultset);
433 
434 
435 
436  fprintf(stdout, "Dropping procedure\n");
437  sql_cmd(dbproc);
438  dbsqlexec(dbproc);
439  while (dbresults(dbproc) != NO_MORE_RESULTS) {
440  /* nop */
441  }
442  dbexit();
443 
444  fprintf(stdout, "%s %s\n", __FILE__, (failed ? "failed!" : "OK"));
445 
446  free_retparam(&save_param);
447  free_retparam(&save_varchar_tds7_param);
448  free_retparam(&save_nvarchar_tds7_param);
449 
450  return failed ? 1 : 0;
451 }
char value[7]
Definition: config.c:431
char PASSWORD[512]
Definition: common.c:31
char DATABASE[512]
Definition: common.c:32
CS_RETCODE read_login_info(void)
Definition: common.c:71
char SERVER[512]
Definition: common.c:30
static TDSLOGIN * login
Definition: dataread.c:31
int syb_err_handler(DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
Definition: common.c:404
RETCODE sql_cmd(DBPROCESS *dbproc)
Definition: common.c:280
int syb_msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line)
Definition: common.c:334
void set_malloc_options(void)
Definition: common.c:47
char param_data4[2 *4000+1]
Definition: rpc.c:118
int ignore_msg_handler(DBPROCESS *dbproc, DBINT msgno, int state, int severity, char *text, char *server, char *proc, int line)
Definition: rpc.c:73
static int colwidth(DBPROCESS *dbproc, int icol)
Definition: rpc.c:112
char param_data3[8000+1]
Definition: rpc.c:118
int main(int argc, char **argv)
Definition: rpc.c:141
int ignore_err_handler(DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
Definition: rpc.c:88
struct parameters_t * pb[]
static RETCODE init_proc(DBPROCESS *dbproc, const char *name)
Definition: rpc.c:22
int param_data2
Definition: rpc.c:119
struct parameters_t bindings[]
char param_data1[64]
Definition: rpc.c:118
static RETPARAM * save_retparam(RETPARAM *param, char *name, char *value, int type, int len)
Definition: rpc.c:50
int param_data5
Definition: rpc.c:119
static void free_retparam(RETPARAM *param)
Definition: rpc.c:65
static char teststr[1024]
Definition: t0006.c:10
STATUS dbnextrow(DBPROCESS *dbproc)
Definition: dblib.c:2076
int failed
Definition: dbmorecmds.c:10
#define EXIT_FAILURE
Definition: fastme.h:73
#define USER
Definition: fastme_common.h:43
static int type
Definition: getdata.c:31
#define NULL
Definition: ncbistd.hpp:225
#define DBSETLPWD(x, y)
Set the password in the login packet.
Definition: sybdb.h:1259
#define DBSETLAPP(x, y)
Set the (client) application name in the login packet.
Definition: sybdb.h:1266
#define DBSETLUSER(x, y)
Set the username in the login packet.
Definition: sybdb.h:1256
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
Definition: dblib.c:719
DBINT dbconvert(DBPROCESS *dbproc, int srctype, const BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen)
cf.
Definition: dblib.c:2604
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
Definition: dblib.c:1706
RETCODE dbinit(void)
Initialize db-lib.
Definition: dblib.c:674
int dbcoltype(DBPROCESS *dbproc, int column)
Get the datatype of a regular result set column.
Definition: dblib.c:2902
RETCODE dbuse(DBPROCESS *dbproc, const char *name)
Change current database.
Definition: dblib.c:1449
RETCODE dbbind(DBPROCESS *dbproc, int column, int vartype, DBINT varlen, BYTE *varaddr)
Tie a host variable to a resultset column.
Definition: dblib.c:2645
DBINT dbcollen(DBPROCESS *dbproc, int column)
Get size of a regular result column.
Definition: dblib.c:3109
DBINT dbcount(DBPROCESS *dbproc)
Get count of rows processed.
Definition: dblib.c:2835
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
Definition: dblib.c:1423
DBBOOL dbwillconvert(int srctype, int desttype)
Test whether or not a datatype can be converted to another datatype.
Definition: dblib.c:2885
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
Definition: dblib.c:5030
void dbsetuserdata(DBPROCESS *dbproc, BYTE *ptr)
Associate client-allocated (and defined) data with a DBPROCESS.
Definition: dblib.c:5849
void dbloginfree(LOGINREC *login)
free the LOGINREC
Definition: dblib.c:751
void dbexit()
Close server connections and free all related structures.
Definition: dblib.c:1559
char * dbcolname(DBPROCESS *dbproc, int column)
Return name of a regular result column.
Definition: dblib.c:1884
int dbnumcols(DBPROCESS *dbproc)
Return number of regular columns in a result set.
Definition: dblib.c:1860
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
Definition: dblib.c:5049
RETCODE dbsqlok(DBPROCESS *dbproc)
Wait for results of a query from the server.
Definition: dblib.c:4722
#define DBSETLPACKET(x, y)
Set the packet size in the login packet for new connections.
Definition: sybdb.h:1283
char * dbretname(DBPROCESS *dbproc, int retnum)
Get name of an output parameter filled by a stored procedure.
Definition: dblib.c:4632
DBINT dbretstatus(DBPROCESS *dbproc)
Fetch status value returned by query or remote procedure call.
Definition: dblib.c:4582
BYTE * dbretdata(DBPROCESS *dbproc, int retnum)
Get value of an output parameter filled by a stored procedure.
Definition: dblib.c:4661
RETCODE dbrpcinit(DBPROCESS *dbproc, const char rpcname[], DBSMALLINT options)
Initialize a remote procedure call.
Definition: rpc.c:72
DBBOOL dbhasretstat(DBPROCESS *dbproc)
Determine if query generated a return status number.
Definition: dblib.c:4558
int dbrettype(DBPROCESS *dbproc, int retnum)
Get datatype of a stored procedure's return parameter.
Definition: dblib.c:6181
int dbretlen(DBPROCESS *dbproc, int retnum)
Get size of an output parameter filled by a stored procedure.
Definition: dblib.c:4687
RETCODE dbrpcparam(DBPROCESS *dbproc, const char paramname[], BYTE status, int db_type, DBINT maxlen, DBINT datalen, BYTE *value)
Add a parameter to a remote procedure call.
Definition: rpc.c:155
RETCODE dbrpcsend(DBPROCESS *dbproc)
Execute the procedure and free associated memory.
Definition: rpc.c:281
int dbnumrets(DBPROCESS *dbproc)
Get count of output parameters filled by a stored procedure.
Definition: dblib.c:4600
exit(2)
int i
int len
static void text(MDB_val *v)
Definition: mdb_dump.c:62
int strcmp(const char *str1, const char *str2)
Definition: odbc_utils.hpp:160
#define strdup
Definition: ncbi_ansi_ext.h:70
static SQLCHAR output[256]
Definition: print.c:5
static const char * proc
Definition: stats.c:21
Definition: rpc.c:14
char * name
Definition: rpc.c:15
int type
Definition: rpc.c:16
int len
Definition: rpc.c:16
char * value
Definition: rpc.c:15
DBINT maxlen
Definition: rpc.c:125
int type
Definition: rpc.c:124
char * name
Definition: rpc.c:122
BYTE * value
Definition: rpc.c:127
BYTE status
Definition: rpc.c:123
DBINT datalen
Definition: rpc.c:126
Definition: type.c:6
#define dbopen(x, y)
Definition: sybdb.h:855
#define SYBINT4
Definition: sybdb.h:170
#define REG_ROW
Definition: sybdb.h:580
#define SYBVARCHAR
Definition: sybdb.h:162
int RETCODE
Definition: sybdb.h:121
unsigned char BYTE
Definition: sybdb.h:334
#define NO_MORE_ROWS
Definition: sybdb.h:582
#define SUCCEED
Definition: sybdb.h:585
#define SYBCHAR
Definition: sybdb.h:160
#define FAIL
Definition: sybdb.h:586
#define DBRPCRETURN
Definition: sybdb.h:577
#define STRINGBIND
Definition: sybdb.h:548
Int4 DBINT
Definition: sybdb.h:255
#define INT_CANCEL
Definition: sybdb.h:62
#define NO_MORE_RESULTS
Definition: sybdb.h:584
DBPROCESS * dbproc
Definition: t0013.c:18
@ TRUE
Definition: testodbc.c:27
static const char * retname(int retcode)
Definition: util.c:282
void free(voidpf ptr)
Modified on Tue Apr 09 07:58:51 2024 by modify_doxy.py rev. 669887
Modified on Wed Apr 10 07:34:14 2024 by modify_doxy.py rev. 669887
Modified on Thu Apr 11 15:12:21 2024 by modify_doxy.py rev. 669887
Modified on Fri Apr 12 17:20:24 2024 by modify_doxy.py rev. 669887
Modified on Sat Apr 13 11:48:08 2024 by modify_doxy.py rev. 669887
Modified on Sun Apr 14 05:27:55 2024 by modify_doxy.py rev. 669887
Modified on Tue Apr 16 20:12:24 2024 by modify_doxy.py rev. 669887
Modified on Wed Apr 17 13:10:02 2024 by modify_doxy.py rev. 669887
Modified on Sat Apr 20 12:19:40 2024 by modify_doxy.py rev. 669887
Modified on Sun Apr 21 03:42:44 2024 by modify_doxy.py rev. 669887