Dumb Axiant cursor question

Steve Franklin steve_franklin@yahoo.com
Fri, 15 Jun 2001 07:35:24 -0500


Thanks for the help.  I am still having problems.  I created the declare
cursor with the appropriate SELECT statement.  When I create my primary file
using that cursor, I get an error at compile time telling me the cursor
already exists in scope.  I think it has to do with both the SQL DECLARE and
the CURSOR statements both being in the same screen.  Unfortunately, I don't
know how to put the SQL DECLARE outside the SCREEN statement so that it is
global.

-----Original Message-----
From: Fry, Mark [mailto:Mark.Fry@COGNOS.com]
Sent: Friday, June 15, 2001 4:42 AM
To: 'Steve Franklin'; powerh-l@lists.swau.edu
Subject: RE: Dumb Axiant cursor question


Hi Steve,

Not a dumb question at all :-)

You need to use a "Program variable" to pass the value from your temporary
item to the database in the SQL cursor.

Let's say you already have your temporary (TempField) declared from your
Data Access tab.  You next need to insert a "Declare Cursor - Query" in the
Data Access tab (let's say you give it a label of PriCur), with syntax as
follows:

SELECT * from bl_Billings_DateView WHERE DateKey >= :TempField

Note the colon before TempField, which indicates to the cursor that it is a
Program Variable (a value from your screen to be passed to the database).

Now you need to insert a "Cursor" in the data access tab to denote that
PriCur is to be used as a Reference (or secondary, or whatever) for the
screen (and occurs with the cluster).  You need to make sure its File/Cursor
property is set to Cursor, and associate it with PriCur by clicking the
Label property, pressing the Browse button that appears, specify the Source
as "Declare Cursors" and pick PriCur from the dropdown list of names.  Then
change its Type property from Primary to whatever is appropriate, and set
the Occurs With property to tie it to the occurring Primary (or Detail).

All that's left is to add some logic to prompt for the temporary item before
its value is passed down to the database by the cursor.  You could probably
do this in the PostPath procedure.

Oh, and of course you will not be able to write to or update the cursor,
since it's based on a view.

Hope that helps,

Good luck!

Mark Fry
Cognos Limited
email: Mark.Fry@Cognos.com

Cognos Limited
Registered in England, number 1635598.  Registered office:  Westerly Point,
Market Street, Bracknell, Berkshire, RG12 1QB

This e-mail may contain confidential information and is confidential to the
user of the e-mail address to which it is addressed.  No-one else may copy
or forward all or any of this e-mail in any form.  If you receive this
e-mail in error please destroy this message and notify the sender by return
e-mail."


-----Original Message-----
From: Steve Franklin [mailto:steve_franklin@yahoo.com]
Sent: 14 June 2001 20:46
To: powerh-l@lists.swau.edu
Subject: Dumb Axiant cursor question


I have a screen with a cluster.  The data in the cluster is associated with
a view in the DB.  On the screen is a temporary field to allow the user to
position to a specific point in the table.  Does anyone have any suggestions
on how to setup the data access so I can do SQL substitution.  The SQL
statement would be SELECT * from bl_Billings_DateView WHERE DateKey >=
TempField.  The TempField is actually a temp field on my screen.  I don't
know where to specify the SELECT statement.  I tried creating a SQL DECLARE,
but since it was within the screen statement, it did not work.

Thanks for the help.

Steve Franklin
Stw Inc.
952-432-2203
Email: steve_franklin@yahoo.com



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com