Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Example ADO function
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