[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: SQL Paragraph Error Checking



Static SQL will always give you an error at run time if the table does not
exsist.
>>> Actually, this is not true.  I get the error before the program
compiles on my single user version which is
SQR 4.2.3 Sqlbase 6.1.2.  I am getting the error at run time in our
development
environment though.
  This is not a major issue, I just want to know why the code will compile
and
run in one environment and not in another.  If possible, I would prefer it
to
fail in both environments.
  The ODBC post earlier sounds plausible, but I am still not certain that
that is
true.
Thanks again for any ideas,
Mark




                    Ethan Kayes
                    <ebkayes@HEWIT        To:     SQR-USERS@list.iex.net
                    T.COM>                cc:
                    Sent by:              Subject:     Re: SQL Paragraph Error 
Checking
                    "Discussion of
                    SQR, Brio
                    Technology's
                    database
                    reporting
                    language"
                    <SQR-USERS@lis
                    t.iex.net>


                    10/29/00 07:55
                    AM
                    Please respond
                    to sqr-users





Hello Mark,

You need to query the either the db2 system tables or the peoplesoft tools
tables to see if the table exists. The tools table will not tell you if the
table has been created. If the table does exist you can use a dynamic sql
statment to update the table.

Static SQL will always give you an error at run time if the table does not
exsist.

in the v4 SQR manual dynamic sql expmles can be found on page 49. the same
logic
can be uses in the Begin-SQL section of the program.

Ethan

Ebkayes@hewitt.com
At partner site in Chennia, India until Sept 15





From: Mark Castleberry <Mark.Castleberry@SHAWINC.COM> on 08/29/2000 05:15
PM

Please respond to sqr-users@list.iex.net

To:   SQR-USERS@list.iex.net
cc:
Client:
Subject:  Re: SQL Paragraph Error Checking



Hello All,
  I hate to post this again, but I never heard what might be the cause.  I
have tried this with the on-error argument and it does not make a
difference.  Please let me know if you have even seen this before.
Thanks,
Mark Castleberry



Hello,
  I am confused about when SQR checks for errors in a SQL paragraph.
  On my PeopleSoft single user version, SQR 4.2.3 Sqlbase 6.1.2 the
following code will cause the SQR to abort BEFORE it compiles . . .
BEGIN-PROCEDURE Test-MC
BEGIN-SQL
UPDATE MARK
SET MARK = 'MARK'
END-SQL
END-PROCEDURE

  The error I get is the following  . . .
(SQR 5528) SQLBase SQLCOM error 601 in cursor 2:
Table has not been created

SQL: UPDATE MARK SET MARK = 'MARK'
Error at : MARK

Error on line 272:
  (SQR 3716) Error in SQL statement.

  I am glad I get this error.  There is no table named MARK so I want SQR
to prevent the program from running in the first place.
  However, in our development environment, SQR 4.3.4/ODBC Level 2
connecting to DB2, the SQR WILL compile and only generates an error if the
section of code is encountered.  Again, the SQR WILL compile with invalid
sql.
  What is the cause of this?  Different SQR version, different database, a
setting that I am missing?
Any help would be greatly appreciated,
Mark Castleberry