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



>
>
> Thanks, Jevgeni.
>
> I tried your suggestion but unfortunately with no luck.
> I have no trouble fetching a single column into a single
> variable - it's when fetching multiple columns into a
> struct that I can't get to work.
>
I see.
Looked again at my programs, it was long time ago when I've experimented with 
SQL, and found only one example, where I read multiple columns. And funny, that 
if I needed to read multiple records, I used a do/while loop.
...
EXEC SQL BEGIN DECLARE SECTION;
  char suf[3] ;
  char numb[6] ;
  char branch[4] ;
EXEC SQL END DECLARE SECTION;
.....
int main....
{
        EXEC SQL DECLARE CURS1 CURSOR FOR
        select scab,scan,scas
        from john/scpf where scan='500053';

        EXEC SQL OPEN CURS1;

        exec SQL WHENEVER NOT FOUND GO TO done1;

do
{
        EXEC SQL FETCH CURS1 INTO :branch, :numb, :suf ;
        ..............
} while (SQLCODE == 0) ;

done1:
  exec sql close CURS1 ;
return(0) ;
}

Jevgeni Astanovski
IT support department manager
Sampo bank
Tallinn, Estonia.


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.