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



Elvis,


-----Original Message-----
From: Elvis Budimlic <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sent: May 2, 2008 2:25 PM

<<< What is For_Read? >>>

It's a constant which keeps me from coding "For Read Only" in each sql statement.


<<< Is FLBHST a character data type? The you have to enclose your 470 etc. with single quotes. >>>

It is character. I get around that with the ? character and put my data fields in the Using clause.


<<< I am going to assume you are checking either sqlcode or sqlstate after EACH SQL statement (otherwise, you're being a bad boy :)) >>>

I am:

// Read Until End Of File
DoW ($SqlRanOK(SqlStt)); // Do While Records Found

// Fetch Records
Exec SQL Fetch Next From @C Into :SLBHREP; // Get Next Record

// Record Found
If ($SqlRanOK(SqlStt)); // Successful SQL?

and this is the procedure:

**********
* $SqlRanOK - Determine If Last SQL Statement Ran Successfully
**********
*
P $SqlRanOK B Successful SQL?
D PI N
D iSQLState 5A Const SQL State

/Free

Return (%Subst(iSQLState :1 :2) = '00') // Successful If First Two Characters
Or (%Subst(iSQLState :1 :2) = '01'); // Of SQLState Are `00` Or `01`

/End-Free

P $SqlRanOK E Successful SQL?
*


<<< Not to steer you away from programming this, but I think you could do this in one UPDATE statement. >>>

I'm not that experienced at SQL. I do what I can. If you have a suggestion, ping me offline at RWMunday@xxxxxxxxxxxxxx

Thanks for the note,



Robert Munday
Munday Software Consultants
in Columbia, SC



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.