/* # line 378 "myingres.sc" */ /* open */
{
IIsqInit(&sqlca);
- IIcsOpen((char *)"c2",10631,20435);
+ IIcsOpen((char *)"c2",22166,10460);
IIwritio(0,(short *)0,1,32,0,(char *)"s2");
- IIcsQuery((char *)"c2",10631,20435);
+ IIcsQuery((char *)"c2",22166,10460);
}
/* # line 379 "myingres.sc" */ /* host code */
if ((check = INGcheck()) < 0) {
/* # line 385 "myingres.sc" */ /* fetch */
{
IIsqInit(&sqlca);
- if (IIcsRetScroll((char *)"c2",10631,20435,-1,-1) != 0) {
+ if (IIcsRetScroll((char *)"c2",22166,10460,-1,-1) != 0) {
IIcsDaGet(0,desc);
IIcsERetrieve();
} /* IIcsRetrieve */
/* # line 405 "myingres.sc" */ /* close */
{
IIsqInit(&sqlca);
- IIcsClose((char *)"c2",10631,20435);
+ IIcsClose((char *)"c2",22166,10460);
}
/* # line 407 "myingres.sc" */ /* host code */
ing_res->status = ING_COMMAND_OK;
}
int INGexec(INGconn *conn, const char *query)
{
-/* # line 487 "myingres.sc" */
+ int check;
+/* # line 488 "myingres.sc" */
int sess_id;
int rowcount;
char *stmt;
-/* # line 491 "myingres.sc" */
+/* # line 492 "myingres.sc" */
stmt = bstrdup(query);
rowcount = -1;
* Switch to the correct default session for this thread.
*/
sess_id = conn->session_id;
-/* # line 500 "myingres.sc" */ /* set_sql */
+/* # line 501 "myingres.sc" */ /* set_sql */
{
IILQssSetSqlio(11,(short *)0,1,30,sizeof(sess_id),&sess_id);
}
-/* # line 501 "myingres.sc" */ /* execute */
+/* # line 502 "myingres.sc" */ /* execute */
{
IIsqInit(&sqlca);
IIsqExImmed(stmt);
IIsyncup((char *)0,0);
}
-/* # line 503 "myingres.sc" */ /* host code */
+/* # line 504 "myingres.sc" */ /* host code */
free(stmt);
- if ((rowcount = INGcheck()) < 0) {
+ if ((check = INGcheck()) < 0) {
+ rowcount = check;
goto bail_out;
}
-/* # line 509 "myingres.sc" */ /* inquire_ingres */
+/* # line 511 "myingres.sc" */ /* inquire_ingres */
{
IILQisInqSqlio((short *)0,1,30,sizeof(rowcount),&rowcount,8);
}
-/* # line 510 "myingres.sc" */ /* host code */
- if ((rowcount = INGcheck()) < 0) {
+/* # line 512 "myingres.sc" */ /* host code */
+ if ((check = INGcheck()) < 0) {
+ rowcount = check;
goto bail_out;
}
bail_out:
/*
* Switch to no default session for this thread.
*/
-/* # line 518 "myingres.sc" */ /* set_sql */
+/* # line 521 "myingres.sc" */ /* set_sql */
{
IILQssSetSqlio(11,(short *)0,1,30,sizeof(-97),(void *)IILQint(-97));
}
-/* # line 519 "myingres.sc" */ /* host code */
+/* # line 522 "myingres.sc" */ /* host code */
return rowcount;
}
INGresult *INGquery(INGconn *conn, const char *query)
INGresult *res = NULL;
int rows = -1;
int cols = INGgetCols(conn, query);
-/* # line 531 "myingres.sc" */
+/* # line 534 "myingres.sc" */
int sess_id;
-/* # line 533 "myingres.sc" */
+/* # line 536 "myingres.sc" */
/*
* Switch to the correct default session for this thread.
*/
sess_id = conn->session_id;
-/* # line 539 "myingres.sc" */ /* set_sql */
+/* # line 542 "myingres.sc" */ /* set_sql */
{
IILQssSetSqlio(11,(short *)0,1,30,sizeof(sess_id),&sess_id);
}
-/* # line 541 "myingres.sc" */ /* host code */
+/* # line 544 "myingres.sc" */ /* host code */
desc = INGgetDescriptor(cols, query);
if (!desc) {
goto bail_out;
/*
* Switch to no default session for this thread.
*/
-/* # line 564 "myingres.sc" */ /* set_sql */
+/* # line 567 "myingres.sc" */ /* set_sql */
{
IILQssSetSqlio(11,(short *)0,1,30,sizeof(-97),(void *)IILQint(-97));
}
-/* # line 565 "myingres.sc" */ /* host code */
+/* # line 568 "myingres.sc" */ /* host code */
return res;
}
void INGclear(INGresult *res)
}
dbconn = (INGconn *)malloc(sizeof(INGconn));
memset(dbconn, 0, sizeof(INGconn));
-/* # line 589 "myingres.sc" */
+/* # line 592 "myingres.sc" */
char ingdbname[24];
char ingdbuser[32];
char ingdbpasswd[32];
int sess_id;
-/* # line 594 "myingres.sc" */
+/* # line 597 "myingres.sc" */
sess_id = session_id;
bstrncpy(ingdbname, dbname, sizeof(ingdbname));
} else {
memset(ingdbpasswd, 0, sizeof(ingdbpasswd));
}
-/* # line 606 "myingres.sc" */ /* connect */
+/* # line 609 "myingres.sc" */ /* connect */
{
IIsqInit(&sqlca);
IILQsidSessID(sess_id);
(char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
(char *)0, (char *)0, (char *)0, (char *)0);
}
-/* # line 611 "myingres.sc" */ /* host code */
+/* # line 614 "myingres.sc" */ /* host code */
} else {
-/* # line 612 "myingres.sc" */ /* connect */
+/* # line 615 "myingres.sc" */ /* connect */
{
IIsqInit(&sqlca);
IILQsidSessID(sess_id);
(char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
(char *)0, (char *)0, (char *)0);
}
-/* # line 615 "myingres.sc" */ /* host code */
+/* # line 618 "myingres.sc" */ /* host code */
}
if (INGcheck() < 0) {
return NULL;
/*
* Switch to no default session for this thread undo default settings from SQL CONNECT.
*/
-/* # line 627 "myingres.sc" */ /* set_sql */
+/* # line 633 "myingres.sc" */ /* set_sql */
{
IILQssSetSqlio(11,(short *)0,1,30,sizeof(-97),(void *)IILQint(-97));
}
-/* # line 629 "myingres.sc" */ /* host code */
+/* # line 635 "myingres.sc" */ /* host code */
return dbconn;
}
void INGdisconnectDB(INGconn *dbconn)
{
-/* # line 634 "myingres.sc" */
+/* # line 640 "myingres.sc" */
int sess_id;
-/* # line 636 "myingres.sc" */
+/* # line 642 "myingres.sc" */
sess_id = dbconn->session_id;
-/* # line 639 "myingres.sc" */ /* disconnect */
+/* # line 645 "myingres.sc" */ /* disconnect */
{
IIsqInit(&sqlca);
IILQsidSessID(sess_id);
IIsqDisconnect();
}
-/* # line 641 "myingres.sc" */ /* host code */
+/* # line 647 "myingres.sc" */ /* host code */
if (dbconn != NULL) {
free(dbconn->msg);
free(dbconn);
}
char *INGerrorMessage(const INGconn *conn)
{
-/* # line 649 "myingres.sc" */
+/* # line 655 "myingres.sc" */
char errbuf[256];
-/* # line 651 "myingres.sc" */
+/* # line 657 "myingres.sc" */
-/* # line 653 "myingres.sc" */ /* inquire_ingres */
+/* # line 659 "myingres.sc" */ /* inquire_ingres */
{
IILQisInqSqlio((short *)0,1,32,255,errbuf,63);
}
-/* # line 654 "myingres.sc" */ /* host code */
+/* # line 660 "myingres.sc" */ /* host code */
memcpy(conn->msg, &errbuf, 256);
return conn->msg;
}
int INGputCopyEnd(INGconn *conn, const char *errormsg);
int INGputCopyData(INGconn *conn, const char *buffer, int nbytes);
*/
-/* # line 668 "myingres.sc" */
+/* # line 674 "myingres.sc" */
#endif