Questions tagged [embedded-sql]

Embedded SQL is the term used for a method of inlining SQL statements with the source code of another programming language, called host language.

Embedded SQL is the term used for a method of inlining SQL statements with the source code of another programming language, called host language.

Examples of embedded SQL are:

112 questions
0
votes
0 answers

818 DB2 error on running binaries on different linux server

I compiled a C++ code on a linux box with DB2 connectivity . The binary got compiled and it is running successfully on that box. However when I deployed the same binary on a different linux box, I am getting 818 error on that box. EmmMktStatus is…
chetan
  • 1,385
  • 4
  • 15
  • 31
0
votes
1 answer

How can I simply convert an ESQL/C file to a C file? (Embedded- SQL/C file to C file)?

I'm working on a migration project. I need to convert ESQL/C files which have .ec extension into c file on gcc. I know that ESQL/C program will create a .c file. But How can I get that? FYI : I'm working on IBM Informix server.
user7921435
0
votes
2 answers

What language is this embedded SQL written in?

Basically I have an exam coming up in Database Design, and one of our main topics is embedded SQL. This is the only example I was given, however with 0 explanation I pretty much have a hard time trying to figure out what is going on, if I knew what…
E. Young
  • 11
  • 2
0
votes
1 answer

How to use parameter values in embedded sql query in python?

I am getting Error when trying to execute this query or when it works it does not take the value of date in account. Can someone tell me how to write this correctly?I pass value of date when i call the function. def get_Value(connection,date): …
Khan Saab
  • 434
  • 1
  • 8
  • 20
0
votes
1 answer

sqlcode does not return DEADABORT when deadlock occurs in ESQL

I'm trying to understand how deadlocks can be managed using ESQL. I created 2 concurrent processes that try to update a "customers" table, exactly like the example given in O'Neil's book "Database":…
Michael Eilers Smith
  • 8,466
  • 20
  • 71
  • 106
0
votes
0 answers

embedding SQL in visual studio C++ code

Can anyone tell me (showing sample code) how to have embedded MS SQL Server SQL queries in a visual studio Win32 console application C++ program (header files, keywords, etc.)? I've set up a C++ project with source file and the standard EXEC SQL…
0
votes
1 answer

Embedded SQL FETCH

In Oracle Pro*C embedded SQL (Ref: https://docs.oracle.com/cd/B10501_01/appdev.920/a97269/pc_06sql.htm), I would like to FETCH INTO three host variables: e.g. EXEC SQL FETCH emp_cursor INTO :emp_name, :emp_number, :salary; In another variation, I…
Dr. Debasish Jana
  • 6,980
  • 4
  • 30
  • 69
0
votes
0 answers

how can I have variable number of bind variables in pro*c SQL query?

Say, I have the following query to execute to read bulk set of records: SELECT c1, c2, c3 , ........, c10 FROM TBL1 WHERE C5 = 5 ORDER BY c7, c8 Then, I have: EXEC SQL WHENEVER SQLERROR DO ...; EXEC SQL DECLARE xx CURSOR FOR xxx; EXEC SQL…
Dr. Debasish Jana
  • 6,980
  • 4
  • 30
  • 69
0
votes
1 answer

Embedded SQL in C , is there a way making table name variable?

I have more than 10,000,000 rows need to be inserted into one table. Considering the number of rows is large, I want to split the big table into 100 small table first, and then insert from table_001 to table_100. I expect to do these: int main(){ …
Tee
  • 91
  • 2
  • 9
0
votes
2 answers

Connect to Quick Books Database with Cobol using ODBC and SQL

We are trying to just open a connection to our QB DB and get any data out of it. We managed to achieve it with C#, but translating to CoBOL (a language that is foreign to us) is proving very difficult. Here is the C# code: class Program { …
0
votes
1 answer

Embedded SQL INSERT Using Dialog Boxes

I'm currently trying to insert new data into an existing table in my database using embedded SQL. I need to be able to enter my data in a dialog box and then have it shown back to me in a dialog box after it has executed. My problem seems to be…
C. Walker
  • 1
  • 1
0
votes
0 answers

In Oracle Pro*C, how to insert a double value as Oracle column of type NUMBER(18,7)

I use Pro*C Code from within my C code to connect to Oracle DB for bulk insert/update using arrays. Here's an example of inserting a C double data into a table having column as NUMBER(18,7). Is the following code snippet valid? Please suggest,…
Dr. Debasish Jana
  • 6,980
  • 4
  • 30
  • 69
0
votes
0 answers

Oracle pro*c way to bulk insert data through memory chunks

I have c/c++ code with embedded SQL for Oracle through ProC. Need to bulk update and bulk insert data to Oracle tables through ProC embedded SQL. Whenever we do an insert or update (below given an update example), update TBL1 set COL1= :v, . . .…
Dr. Debasish Jana
  • 6,980
  • 4
  • 30
  • 69
0
votes
1 answer

How embedded SQL program in C gets executed as in the backend?

When a C program is written using Embedded SQL, (eg: lets assume that a table is created with values inserted), how it gets executed in the backend before displaying the output table in the frontend? Help is appreciated...!
Humaira
  • 23
  • 8
0
votes
1 answer

Does anyone know why my execute immediate doesn't complie in PRO*C?

Can anyone figure out what is my mistake in the following PRO*C code? I cannot compile this: int v1 = 5096; int v2 = 8110; int v3 = 8111; int v4 = -1; char stmt[6000]; strcpy(stmt, " MERGE INTO LDX_STYLE_MOVEMENTS ssd USING (SELECT :1 pk from…
Dax
  • 438
  • 1
  • 8
  • 29