Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Example ADO function

Re: Example ADO function

From: Pile <philipwinfield_at_totalise.co.uk>
Date: 20 Jun 2003 02:36:20 -0700
Message-ID: <f2fcb581.0306200136.554f6fcd@posting.google.com>


Rebro <rebro_at_mail.net.mk> wrote in message news:<d0ptevod95c643tsk3dmvqt9ooltd7aeup_at_4ax.com>...
> >Thanks Steve, yes I have seen this but this did not work either. And
> >Jim, thanks for your helpful observation of the error message. Yes, it
> >was obvious so I upgraded to the 9.2.0.4 version of the Oracle ODBC
> >driver - if you know of another that will work or an alternative code
> >approach that might be useful.
>
> As I understood you need to call Oracle stored function from ASP. You
> can try this...
>
> I think you can manage :-)
>
> Set konekcija = Server.CreateObject("ADODB.Connection")
> konekcija.Open "Provider=MSDAORA.1;Data Source=oracle_sid;Persist
> Security Info=True","username","password"
> Set cmdobject = Server.CreateObject("ADODB.Command")
> sql = "{?= call package1.function1(?,?,?)}"
> With cmdobject
> Set .ActiveConnection = konekcija
> .CommandText = sql
> .CommandType = adCmdText
> .Parameters(1).Value = Request.Form("param1")
> .Parameters(2).Value = Request.Form("param2")
> .Parameters(3).Value = Request.Form("param3")
> .Execute()
> End With
> With cmdobject
> function_result = .Parameters(0)
> End With
> cmdobject.close
> konekcija.close
> set cmdobject=nothing
> set konekcija=nothing

Rebro
Thanks so much for posting this - this is what I am after and I suspect it is almost there now, however I get the following error. Any additional ideas welcome before I ditch ADO in favor of ))4). Phil

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.


Please try the following:

Click the Refresh button, or try again later.

Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error Internet Information Services


Technical Information (for support personnel)

Error Type:
Provider (0x80004005)
Unspecified error
/fastcoder/query2.asp, line 27

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BTopenworld)

Page:
GET /fastcoder/query2.asp

Time:
Friday, June 20, 2003, 10:34:22 AM

More information:
Microsoft Support Received on Fri Jun 20 2003 - 04:36:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US