Need help with embedded SQL; AREV v. 3.03 (AREV Specific)
At 15 JUL 2004 04:17:34PM Anthony M Steve wrote:
I'm having trouble trying to add embedded SQL into an existing r/basic program. I've followed the manual, surrounding my SQL code with EXEC SQL and END EXEC. It compiles with no errors, the SOURCE table contains SQLMOD_progname, and the OBJECT table contains SQLMOD_progname just like the manual says it should. When I try to run the program, however, I get the following W177 error:
Unable to execute "SQLMOD_progname"The object code "$SQLMOD_progname"cannot be foundin the "SOURCE" table.I don't know why it's looking for object code in the source table! I even tried copying the row from the object table to the source table, and it said it copied one row, but I still can't find the object ($SQLMOD_progname) in the source table.
Any help would be *greatly* appreciated – this is driving me nuts!
TIA,
Tony
At 19 JUL 2004 08:30AM Anthony M Steve wrote:
I think I've figured it out, so I'm posting in case anyone else tries this and has trouble . . .
If you compile code in the SOURCE table, the object is automatically placed in the OBJECT table. Since the error message said it was looking for the object code in the source table, and copying the object row to the source table didn't seem to work, I moved the source code to the BP table, and compiled it there. Now both the source and the object are in the BP table, and the error no longer appears.
At 19 JUL 2004 09:35AM [email protected] wrote:
That's very kind of you to share your knowledge in this manner. We suspect that the lack of responses you received was due to your being on a somewhat non-standard AREV version. Also most AREV people tend not to use SQL of any description - it was more kind of a "checkbox" for marketing purposes way back then.
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
At 19 JUL 2004 11:04AM Anthony M Steve wrote:
I asked for help, so it only seems fair to share when I can! FWIW, I may have to abandon the embedded SQL route anyway, as the parameter passing doesn't appear to be working correctly. I'm getting values returned, but it seems to be ignoring the variable I'm using to limit the query in the WHERE clause, and so it's not returning anything I can use. I'm trying to add some statistics to a program, and it would be a lot easier if I could use the SQL min, max, avg, and count functions. If I can't get the SQL to work, I can do the calculations in r/basic, of course, but SQL seemed to be an easier route to get me there.
I would look at trying to upgrade to 3.12 (not sure if I can do this for free, or if we'd have to buy the upgrade), but we're starting on a path that will probably retire AREV here by the end of the year, so it's probably not worth the effort.
At 19 JUL 2004 12:22PM Ralph Johler wrote:
For what it's worth - we tried using SQL on Arev 2.12 and Arev 3.01 (which was a pretty crabby Arev) and had many issues.
The most insolvable to us was the 256 byte sql-statement limit. Most of our useful sql statements went way beyond 256 bytes, and then they don't run, either hanging or actually crashing arev.
I've always wondered why, in the bad kind of way you wonder how the trains crashed together, or all the cars piled up on the freeway.
Thanks for posting a resolution - it is frustrating to find a thread that is similar to your problem, only to find the 'fix' is not posted, and the thread just dies out…