Thanks a lot Russell. It works great for calling the procedure. I'm not getting the output parameter yet for some reason, but I can get the value through a select statement and am not really worried about it. I really appreciate it!
-----Original Message----- From: Russell Stephany [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 7:32 PM To: [EMAIL PROTECTED] Subject: RE: Witango-Talk: Oracle Stored Procedures mike, i have never used the <@bind> tag except to get data out of a direct dmbs statement...i don't use the method scope (since i don't write tcfs), but i would image that the variables are accessible the same as user/request. i would write your code like this... declare nedid varchar2(10) := '@@method$nedid'; bdate date := '@@method$bdate'; thisscid varchar2(10); begin CREATE_ONE_SCIENTIST_FROM_NED ( nedid, bdate, thisscid); commit; <@bind name=thisscid bindname=thisscid datatype=varchar scope=method bindtype=out> := nvl(thisscid,' '); end; the only problems i have are regarding dates, since the date format in witango and oracle are not always the same. i will often have to do a to_date() with a format string to get the correct info. the other caveat is that <@bind bindtype=out> gets very unhappy if the value is null. that's why i included the nvl(). hope this helps (though i know it doesn't explain <@bind>) cheers, russell -------------------------------------------------------------- Russell Stephany Lead Developer, Information Technology Australian Graduate School of Management UNSW SYDNEY NSW 2052 Australia Tel: +61 2 9931-9263 Fax: +61 2 9931-9349 Email: [EMAIL PROTECTED] Web: http://www.agsm.edu.au The Australian Graduate School of Management is a School of both The University of Sydney & The University of New South Wales. CRICOS Provider Number: 00098G "Mike" <[EMAIL PROTECTED]> wrote on 10/06/2004 11:27:57 PM: > Oops. For the record, the procedure name is CREATE_ONE_SCIENTIST_FROM_NED. > It matches in the database and in the Direct DBMS call; this was just > a typo > when I sent the email. The error is not related to this. :) > > From: Mike [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 10, 2004 9:18 AM > To: [EMAIL PROTECTED] > Subject: Witango-Talk: Oracle Stored Procedures > Hi everyone, > I'm trying to use a direct DBMS action to execute Oracle 9i Stored > Procedures. The procedure utilizes out parameters to return values to the > user. The procedure definition is: > create procedure CREATE_ONE_SCIENTIST (pnedid in char, bdate in date, > this_scid out char) > and it is known to work perfectly if called from sql*net or an Oracle tool. > > I've read up on the <@BIND> metatag and attempted to follow the instructions > in the documentation and on this mailing list, and have been getting some > pretty generic error messages telling me that the values are not being bound > correctly. Here is my direct DBMS statement: > begin > CREATE_ONE_SCIENTIST_FROM_NED ( > <@bind name=nedid scope="method" bindtype="in" datatype="char" > precision="10">, > <@bind name=bdate scope="method" bindtype="in" datatype="date">, <@bind > name=thisscid scope="method" bindtype="out" datatype="char" > precision="10">); > <@CRLF> > commit; > <@CRLF> > end; > The two input parameters, nedid and bdate, have been previously stored in > method variables, and the hope is that the output parameter would be stored > in the variable method$thisscid. I should note that this is being executed > on the most recent Witango development server on OS X, and the datasource is > an Oracle OCI. > Thanks for the assistance! > Mike > PS: I noticed too that when the <@BIND> tag creates the database call, it > takes whatever follows the name parameter and just sticks a ":" in front of > it. <@bind name="method$bdate"> becomes :"method$bdate" when sent to > Oracle; is this correct? I don't know if all of those characters are > allowed in Oracle variable names. > ________________________________________________________________________ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > ________________________________________________________________________ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ____________________________________________________________________________ DISCLAIMER This email and any files transmitted with it are confidential and may be subject to copyright. They are intended solely for the use of the individual or entity to whom they are addressed. If you have received this message in error please notify the AGSM immediately by return email or reverse charge telephone call to +61 2 9931 9200. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the AGSM, except where an authorised sender specifically states them to be the views of the AGSM. It is your responsibility to check this email and any attachments for the presence of viruses. The AGSM accepts no liability for any damage caused by any virus transmitted. ____________________________________________________________________________ ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
