This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes C / C++ and the fly likes embedded SQL in legacy C code --- fetch issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "embedded SQL in legacy C code --- fetch issue" Watch "embedded SQL in legacy C code --- fetch issue" New topic
Author

embedded SQL in legacy C code --- fetch issue

Grace Russo
Ranch Hand

Joined: Nov 08, 2010
Posts: 64
I really need some help.
I have embedded SQL in legacy C code.
THis is a code snippet: the C code opens a .txt file, and uploads data into a temp table, this happens correctly.
Then a cursor is declared (mastempc) to fetch one row at a time and process it.
The cursor does fetch all records from the temp table in the defined order, but at the second record, it seems the fetch has a hiccup of some sort:
the data fecthed are null (it prints the "WRONG" and the data in the insert it tries to do, then it continues ... I cannot figure out why.
There are no null records in the temp table ...
I woudl really appreciate.



Grace Russo
Ranch Hand

Joined: Nov 08, 2010
Posts: 64
It does not seem to process the last line, and at the fetch I get an error ORA-01403: no data found

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: embedded SQL in legacy C code --- fetch issue
 
Similar Threads
ORA-01002 fetch out of sequence
ORA-01002:fetch out of sequence
Design issue regarding how to validate records in an uploaded excel sheet.
DB2 700 and 701 - Test Sample
db2 - 703 certification