stored procedures - how can i send an anonymous block to oracle and get result from oracle in coldfusion -


How can I send an anonymous block in Oracle and get some feedback from Oracle? I tried cfquery , but it does not work. great thank you.


@ Antony, I know that I can write an unknown block in cfquery. Like:

  & lt; Cfquery name = "queryName" data source = "oracle11ghr" result = "queryname_meta" & gt; Initially npr_t_reservation (reservation_id) values ​​(INSERT) (33); Npr_t_reservation (reservation_id) values ​​in INSERT (34); Update npr_t_reservation set reservation_id = 35 WHERE reservation_id = 34; COMMIT; End; & Lt; / Cfquery & gt; In fact, what I did not know how I could get some profit value by sending   anonymous block   to oracle.  

@Antony, Hi Antony, The upper code is just a demonstration; Actually, I want to get rid of immoral, simple datatype, not an example of collection or object type. Like VARCHAR2, NUMBER etc.


@APC, I do not use any kind of archived program because I do not have permission to save it to a database, so why do I want to use an anonymous block to do the work of databases ? Because I need to do a lot of database related work, if I do this work in coldfusion it will be complicated and trivial.

Can not you include a SELECT query to return your value?

  & lt; Cfquery name = "queryName" datacentrate = "oracle11ghr" result = "queryname_meta" & gt; Initially npr_t_reservation (reservation_id) values ​​(INSERT) (33); Npr_t_reservation (reservation_id) values ​​in INSERT (34); Update npr_t_reservation set reservation_id = 35 WHERE reservation_id = 34; COMMIT; Select 'myReturnValue' as repeating RETURN_VALUE; End; & Lt; / Cfquery & gt; & Lt; Cfoutput & gt; # QueryName.RETURN_VALUE # & lt; / Cfoutput & gt;  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -