× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Date procedure
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Tue, 12 Dec 2000 18:10:10 -0700

Rob,

You can get by without the SQL toolkit, but it is worth having either way.  The 
real 
power comes into play when you realize that the fields and the return location 
are 
variables. Extending this out, you can then get down to a single procedure that 
handles all lookups. Once all of this code is centralized and shared by all of 
your 
programs it is easy to justify built in support for things like dynamic 
scanning, 
positioning, ordering, etc. The SQL is only one layer but it is an important 
and 
powerful one. 

That means that you can easily build your requests on the fly.  I agree that 
it is not hard to code a declare cursor, but when I look at code for SQL 
procedures 
that I have written I find a lot more.  In my code I find prepare, fetch, open, 
close, 
recover and error handling, etc.  

David Morris

>>> rob@dekko.com 12/12/00 02:35PM >>>

Is this one of those techniques to use imbedded SQL without purchasing the
SQL toolkit?
Do you use CRTBNDRPG/CRTRPGMOD to compile this versus CRTSQLRPGI?  If so
what other binding directories, if any, are needed?

Frankly I find the 'Eval SQLHandle...' stuff more complicated that doing
the standard C/EXEC SQL technique.  How did you figure this stuff out -
looking at output from the SQL precompiler?

I take it that SQLOpen will take the fields returned from 'Select * from
...' and store it into the data structure whose address is based at
%ADDR(InputArea) when SQLFetch is executed?

If I study this for awhile, it makes sense, but then having a firm basis in
how the C/EXEC SQL stuff works helps, especially declaring, opening and
fetching from a cursor.

Rob Berendt

==================
Remember the Cole!


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.