This is a discussion on Re: [Info-Ingres] Embedded SQL within the Ingres forums, part of the Database Server Software category; --> Hi Mohan, Try this... cc your.c -o your_executable -L${II_SYSTEM}/ingres/lib Then if there are still errors can you please cut ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi Mohan, Try this... cc your.c -o your_executable -L${II_SYSTEM}/ingres/lib Then if there are still errors can you please cut and paste your attempts to do this into a response. People have been bending over backwards to help you and have been forced to work blind as you are not providing a lot of detail in your postings. Martin Bowes |
| ||||
| Hi, Following the Embedded SQL program I've written: #include <stdio.h> EXEC SQL INCLUDE SQLCA; void main() { EXEC SQL CONNECT causp; EXEC SQL WHENEVER SQLERROR STOP; EXEC SQL DELETE FROM skeletons WHERE id = 40; EXEC SQL DISCONNECT; } After writing this I've used the command : esqlc TestKt.sc. This command generated the TestKT.c file. TestKT.c is as follows: # include "C:\IngresII\ingres\files\eqdef.h" #include <stdio.h> # include "C:\IngresII\ingres\files\eqsqlca.h" __declspec(dllimport) IISQLCA sqlca; /* SQL Communications Area */ void main() { /* # line 7 "TestKT.sc" */ /* connect */ { IIsqInit(&sqlca); IIsqConnect(0,"causp",(char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0); } /* # line 11 "TestKT.sc" */ /* delete */ { IIsqInit(&sqlca); IIwritio(0,(short *)0,1,32,0,"delete from skeletons where id=40"); IIsyncup((char *)0,0); if (sqlca.sqlcode < 0) IIsqStop(&sqlca); } /* # line 13 "TestKT.sc" */ /* disconnect */ { IIsqInit(&sqlca); IIsqDisconnect(); if (sqlca.sqlcode < 0) IIsqStop(&sqlca); } /* # line 14 "TestKT.sc" */ /* host code */ } When I try to run this file using TurboC I am getting the following errors: ERROR D:\TestKT.c 4: 'sqlca' not an argument in function __declspec ERROR D:\TestKT.c 6: 'main' not an argument in function __declspec ERROR D:\TestKT.c 6: Declaration syntax error in function __declspec Thanks Mohan |
| Thread Tools | |
| Display Modes | |
|
|