dbTalk Databases Forums  

stored procedures how to ?

comp.databases.gupta comp.databases.gupta


Discuss stored procedures how to ? in the comp.databases.gupta forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
augustose
 
Posts: n/a

Default stored procedures how to ? - 04-25-2006 , 10:00 AM






Hi, I'm newbie with Gupta and SAL, and I need to create some stored
procedures.
Perhaps some one can help me with this issue.
The objectives of my procedures are:
- return a set of multi-fields records
- create data inside the procedure, not exactly from the tables.

I need some tips to use SQL Console and SQL Talk ( I already
downloaded WinSQL

I' trying with this procedure

/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
PREPARE
PROCEDURE: PART_INPROC
Parameters
String: sName
Receive Number: nStock
Local Variables
Sql Handle: hSqlCur1
String: sSelect
Number: nInd
Actions
On Procedure Startup
Call SqlConnect(hSqlCur1)
Set sSelect = 'Select QTY_ON_HAND from PART \
where DESCRIPTION = :sName into :nStock'
Call SqlPrepare(hSqlCur1, sSelect)
On Procedure Execute
Call SqlExecute(hSqlCur1)
On Procedure Fetch
If NOT SqlFetchNext(hSqlCur1, nInd)
Return 1
Else
Return 0
On Procedure Close
Call SqlDisconnect(hSqlCur1)
;

if I call the
perform PART_INPROC;
the SQLTalk gives me the form to enter the parameters. and after put
the parameter, It gives me no result

if I use
perform PART_INPROC
\
'STAINLESS STEEL',0,
/;
or
perform PART_INPROC
\
STAINLESS STEEL,,
/;
or
perform PART_INPROC
\
STAINLESS STEEL,0,
/;


it Gives me the same message
Data not specified for all columns in the last row.


thanks in advance for any help

Augusto


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.