![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am trying to use embedded SQL to work with the Ingres database. Following is the simple program I have written: EXEC SQL INCLUDE SQLCA; EXEC SQL WHENEVER SQLERROR STOP; EXEC SQL CONNECT causp; EXEC SQL DELETE FROM indexes WHERE id = 40; EXEC SQL DISCONNECT; But these embedded sql statements are not getting recognized and are resulting in errors. I am using Microsoft Visual Studio 2005 to write the programs. Can anyone please tell me how to overcome this? Thanks in advance Mohan |
#3
| |||
| |||
|
|
Hi, I am trying to use embedded SQL to work with the Ingres database. Following is the simple program I have written: EXEC SQL INCLUDE SQLCA; EXEC SQL WHENEVER SQLERROR STOP; EXEC SQL CONNECT causp; EXEC SQL DELETE FROM indexes WHERE id = 40; EXEC SQL DISCONNECT; But these embedded sql statements are not getting recognized and are resulting in errors. I am using Microsoft Visual Studio 2005 to write the programs. Can anyone please tell me how to overcome this? Thanks in advance Mohan |
#4
| |||
| |||
|
|
Mohan, You need to pre-process the embedded SQL code - esqlc is the utility. This will convert the *.sc file to *.c which can then be compiled. The process is described in the "Embedded SQL Companion Guide". John On Mar 21, 7:37 pm, kodali... (AT) gmail (DOT) com wrote: Hi, I am trying to use embedded SQL to work with the Ingres database. Following is the simple program I have written: EXEC SQL INCLUDE SQLCA; EXEC SQL WHENEVER SQLERROR STOP; EXEC SQL CONNECT causp; EXEC SQL DELETE FROM indexes WHERE id = 40; EXEC SQL DISCONNECT; But these embedded sql statements are not getting recognized and are resulting in errors. I am using Microsoft Visual Studio 2005 to write the programs. Can anyone please tell me how to overcome this? Thanks in advance Mohan- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
Hi, I've tried the command "esqlc -l file.cpp". But the error is: 'esqlc' is not recognized as an internal or external command, operable program or batch file. |
#6
| |||
| |||
|
|
Hi, I've tried the command "esqlc -l file.cpp". But the error is: 'esqlc' is not recognized as an internal or external command, operable program or batch file. |
#7
| |||
| |||
|
|
kodali... (AT) gmail (DOT) com> wrote in message news:1174468436.760937.198230 (AT) n76g2000hsh (DOT) googlegroups.com... Hi, I've tried the command "esqlc -l file.cpp". But the error is: 'esqlc' is not recognized as an internal or external command, operable program or batch file. Is the pre-processor installed on the machine where you are doing this? What is the PATH for the user who is compiling? (Also it looks like you are trying to pre-process the wrong file. esqlc expects a file with a .sc suffix.) Roy |
#8
| |||
| |||
|
|
what I am doing is write a C++ file and compile it. Is it not possible to do in this way? How can we know whether pre-processor is installed or not? |
#9
| |||
| |||
|
|
what I am doing is write a C++ file and compile it. Is it not possible to do in this way? |
|
How can we know whether pre-processor is installed or not? |
#10
| |||
| |||
|
|
kodali... (AT) gmail (DOT) com> wrote in message news:1174470742.777525.140080 (AT) b75g2000hsg (DOT) googlegroups.com... what I am doing is write a C++ file and compile it. Is it not possible to do in this way? The words EXEC SQL ... are not C++ code are they? They have to be translated into API calls in C++ syntax before the C++ compiler ever gets to see the code. How can we know whether pre-processor is installed or not? There are various ways. I am old and reactionary so I would do it as follows. Log in as the user who is trying to compile the code, start a DOS window, and (assuming everying is on the C: drive): cd %II_SYSTEM%\ingres\bin dir esql*.exe You should see esqlc.exe and esqlcc.exe. Also, still in the DOS window: set And look for PATH to see if the above ingres\bin directory is in the path. Roy |
![]() |
| Thread Tools | |
| Display Modes | |
| |