IIsqPrepare(0,(char *)"s1",(char *)0,0,stmtd);
}
/* # line 39 "myingres.sc" */ /* host code */
- if (INGcheck() < 0 ) {
+ if (INGcheck() < 0) {
free(stmtd);
free(sqlda);
return -1;
IIsqDescribe(0,(char *)"s1",sqlda,0);
}
/* # line 45 "myingres.sc" */ /* host code */
- if (INGcheck() < 0 ) {
+ if (INGcheck() < 0) {
free(stmtd);
free(sqlda);
return -1;
/*
* Free all rows and fields, then res, not descriptor!
*/
- if (ing_res != NULL ) {
+ if (ing_res != NULL) {
/*
* Use of rows is a nasty workaround til I find the reason,
* why aggregates like max() don't work
if (row == NULL || sqlda == NULL) {
return;
}
- for (i = 0; i < sqlda->sqld; ++i ) {
+ for (i = 0; i < sqlda->sqld; ++i) {
free(row->sqlvar[i].sqldata);
free(row->sqlvar[i].sqlind);
}
}
char *INGfname(const INGresult *res, int column_number)
{
- if ( (column_number > res->num_fields) || (column_number < 0) ) {
+ if ((column_number > res->num_fields) || (column_number < 0)) {
return NULL;
} else {
return res->fields[column_number].name;
strcpy(ingdbname,dbname);
if (user != NULL) {
strcpy(ingdbuser,user);
- if ( passwd != NULL) {
+ if (passwd != NULL) {
strcpy(ingdbpasw,passwd);
} else {
strcpy(ingdbpasw, "");
strncpy(stmtd,stmt,strlen(stmt)+1);
EXEC SQL PREPARE s1 from :stmtd;
- if (INGcheck() < 0 ) {
+ if (INGcheck() < 0) {
free(stmtd);
free(sqlda);
return -1;
}
EXEC SQL DESCRIBE s1 into :sqlda;
- if (INGcheck() < 0 ) {
+ if (INGcheck() < 0) {
free(stmtd);
free(sqlda);
return -1;
/*
* Free all rows and fields, then res, not descriptor!
*/
- if (ing_res != NULL ) {
+ if (ing_res != NULL) {
/*
* Use of rows is a nasty workaround til I find the reason,
* why aggregates like max() don't work
return;
}
- for (i = 0; i < sqlda->sqld; ++i ) {
+ for (i = 0; i < sqlda->sqld; ++i) {
free(row->sqlvar[i].sqldata);
free(row->sqlvar[i].sqlind);
}
char *INGfname(const INGresult *res, int column_number)
{
- if ( (column_number > res->num_fields) || (column_number < 0) ) {
+ if ((column_number > res->num_fields) || (column_number < 0)) {
return NULL;
} else {
return res->fields[column_number].name;
if (user != NULL) {
strcpy(ingdbuser,user);
- if ( passwd != NULL) {
+ if (passwd != NULL) {
strcpy(ingdbpasw,passwd);
} else {
strcpy(ingdbpasw, "");