/* * Copyright (c) 1994, 1995, 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include typedef char string[20]; EXEC SQL BEGIN DECLARE SECTION; EXEC SQL TYPE string IS STRING(20) REFERENCE; string username; string password; string database; string fucode; string izahl; string lst; string grundlst; string jahr; string monat; string tag; string zeit; ROWID x; DATE y; EXEC SQL END DECLARE SECTION; int i; int fuc; #define FU_AUF 0 #define FU_ENT 1 #define FU_INT 2 const char *futab = "ADT"; EXEC SQL INCLUDE sqlca; void sqlerror(); /* handles unrecoverable errors */ main(int argc, char *argv[]) { /* Log onto ORACLE */ strcpy(username, "schadow"); strcpy(password, "hl7ora"); strcpy(database, "T:anae:anae"); EXEC SQL WHENEVER SQLERROR DO sqlerror(); EXEC SQL CONNECT :username IDENTIFIED BY :password USING :database; for(i=1; i