Mapper
sqlfatal.c
Go to the documentation of this file.
1 #include <sqlhdr.h>
2 #include <sqliapi.h>
3 #line 1 "sqlfatal.ec"
4 #include <stdio.h>
5 
6 int
7 sqlfatal_loc( f, ln)
8 
9 char *f;
10 int ln;
11 {
12  char msg[160];
13 
14  if( SQLCODE < 0) {
15  fprintf( stderr,
16  "sqlcode %ld, isam %ld, file %s, line %d\n",
17  SQLCODE, sqlca.sqlerrd[1], f, ln);
18 
19  rgetmsg((short)sqlca.sqlcode, msg, sizeof(msg));
20  fprintf(stderr,"Sql: ");
21  fprintf(stderr, msg, sqlca.sqlerrm);
22 
23  if(sqlca.sqlerrd[1] ) {
24  rgetmsg((short)(sqlca.sqlerrd[1]), msg, sizeof(msg));
25  fprintf(stderr, "%s", msg);
26  }
27  exit(1);
28  }
29 }
30 
31 #line 26 "sqlfatal.ec"
long SQLCODE
struct sqlca_s sqlca
fprintf(fp,"%d %d %d %d 1\n", iminx, iminy, maxi, maxj)
int sqlfatal_loc(char *f, int ln)
Definition: sqlfatal.c:7
long sqlerrd[6]
Definition: db.c:47
long sqlcode
Definition: db.c:44
char sqlerrm[72]
Definition: db.c:45