Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 5th, 2002, 10:41 PM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
Zope ZSQL problem

I have 4 ZSQL's that call Oracle PL/SQL functions. The 4 functions are all joined to each other in a package.

ie
TXN_PKG.NEW_PROCESS_FNC (proc_new_process)
TXN_PKG.NEW_TXN_FNC (proc_new_txn)
TXN_PKG.NEW_TXN_ATT_ZOPE (proc_add_data)
TXN_PKG.TXN_INPUTTED (proc_release_txn)

They all have 1 return value called return_value. These functions need to run one after the other on the submit of a form.

I will explain here what inputs each one have

TXN_PKG.NEW_PROCESS_FNC

This has one input and is fixed, the value is "4"

TXN_PKG.NEW_TXN_FNC

This has three inputs in this order:
txn_group : "1021" (fixed)
null_value : "null" (fixed)
txn_id : "return_value of TXN_PKG.NEW_PROCESS_FNC"

TXN_PKG.NEW_TXN_ATT_ZOPE

This has three inputs
txn_id : "same as above"
attribute_value : "RULE_ID" (fixed)
attribute_amount : "variable determined by user" inputted via form

TXN_PKG.TXN_INPUTTED

This has one input
txn_id : "same as above"

Now that I have explained roughly what each object does, I will explain my dilema.

There is a form which the user uses and it has only 1 input box for the attribute_amount. The rest of the fixed value's are hidden fields in the form.

On submit all 4 ZSQL's need to be run one after the other.

So I need to find a way to pass the variables from one ZSQL to the other.

I have tried doing it this way (the form calls the below code, which is in a seperate method)

<dtml-try>
<dtml-in proc_new_process>
<dtml-let process_id=return_value>
</dtml-let>
</dtml-in>
<dtml-except>
|script>
alert("error one");
|/script>
</dtml-try>

<dtml try>
<dtml-in proc_new_txn>
<dtml-let txn_id=return_value>
</dtml-let>
</dtml-in>
<dtml except>
|script>
alert("error two");
|/script>
</dtml try>

<dtml-try>
<dtml-call proc_add_data>
<dtml-except>
|script>
alert("error three");
|/script>
</dtml-try>

<dtml-try>
<dtml-call proc_release_txn>
<dtml-except>
|script>
alert("error four");
|/script>
</dtml-try>

(I have replaced < with | in front of the script tags)

But this does not work, it does the first ZSQL but fails after that - it does not find the value's.

HELP PLEASE
wabirdman
__________________
Real programmers code in binary

Reply With Quote
  #2  
Old May 31st, 2002, 12:54 AM
wabirdman wabirdman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Australia
Posts: 111 wabirdman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 19 sec
Reputation Power: 13
It turned out to be an easy solution

<dtml-in proc_new_process>
<dtml-call "REQUEST.set('txn_group', 4)">
<dtml-call "REQUEST.set('process_id', return_value)">
</dtml-in>
<dtml-in proc_new_txn>
<dtml-call "REQUEST.set('txn_type', 1021)">
<dtml-call "REQUEST.set('txn_id', return_value)">
</dtml-in>
<dtml-call proc_add_data>
<dtml-call proc_release_txn>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Zope ZSQL problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap