× 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: rob@xxxxxxxxx
  • Date: Tue, 12 Dec 2000 16:35:47 -0500


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!


                                                                                
                                       
                    "David Morris"                                              
                                       
                    <dmorris@plumcree        To:     <RPG400-L@midrange.com>    
                                       
                    k.com>                   cc:                                
                                       
                    Sent by:                 Subject:     Re: Date procedure    
                                       
                    owner-rpg400-l@mi                                           
                                       
                    drange.com                                                  
                                       
                                                                                
                                       
                                                                                
                                       
                    12/12/00 01:15 PM                                           
                                       
                    Please respond to                                           
                                       
                    RPG400-L                                                    
                                       
                                                                                
                                       
                                                                                
                                       




Rolf & Buck,

Your observations that moving SQL to a single program are quite different
than
my experience.  We use one program for most of our SQL and it greatly
simplifies using SQL.  For example:

EVAL SQLHandle = SQLOpen('Select * from...': %ADDR(InputArea))
IF        SQLHandle <> *ZEROS
DOU  SQLEOF or SQLErr
EVAL SQLFlg = SQLFetch(SQLHandle)
...blablabla
ENDIF
ENDIF

Seems simpler than worrying about cursors, SQL limitations, etc.  You do
pay a very slight performance penalty because the statement has to be
prepared. In many cases you get this back because of the ability to easily
manipulate data and select only what you want/need.

David Morris

>>> buck.calabro@aptissoftware.com 12/12/00 07:38AM >>>
Rolf Mittag wrote:

>That's just as I do it for now. I've a service-program for
>all Sql. But that's _definitivley_ _not_ desirable as a design
>because it makes simple things more complicated.

As you say, it makes simple things more complicated, but nowadays, what is
simple anymore?...

Buck Calabro
Aptis; Albany, NY
"Nothing is so firmly believed as
 that which we least know" -- Michel Montaigne

+---
| 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
+---



+---
| 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.