Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is it possible using stored procedure like this way???
Hi Tom,
Thank you for reply.
Do you have any idea???
Dodo
"tojo" <Tojo_at_hotmail.com> ???
news:MPG.1b7ace8e463ccdb09896fa_at_news.t-online.de ???...
> In article <ceq3nm$94s$1_at_sunnews.cern.ch>, dominique_hung_at_hotmail.com
> says...
> > First off, thank you to have a look my question.
> >
> >
> > Here is the ASP code
>
> --------------------------------------------------------------------------
--Received on Wed Aug 04 2004 - 07:31:46 CDT
> > ---------------
> >
> > <%@ Language=VBScript %>
> >
> > <%
> > Dim partName, Comm, con,param
> >
> > set con = Server.CreateObject("ADODB.Connection")
> >
> > con.ConnectionString = "DRIVER={Microsoft ODBC for Oracle};SERVER=ora92;
> > UID=test;PWD=test"
> > con.Open()
> >
> > Set Comm = Server.CreateObject("ADODB.Command")
> >
> > Comm.ActiveConnection = con
> > With Comm
> > .CommandText = "{CALL PkgPartition.add(?)}"
> > .CommandType = 1 '1=adCmdText
> > End With
> > Set param = Comm.CreateParameter("paramPartName", 8, 1,100,ASPTest)
> > Comm.Parameters.Append param
> > Comm.Execute ,,128
> > Response.Write ("<p> The partitionName is " &
> > Comm.Parameters("paramPartName"))
> > con.Close
> > %>
> >
> > Error message
>
> --------------------------------------------------------------------------
--
> > ---------
> >
> > Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> > [Microsoft][ODBC driver for Oracle][Oracle]ORA-20004:
> > /partition.asp, line 23
> >
> >
> > Package code
>
> --------------------------------------------------------------------------
--
> > ------------
> > CREATE OR REPLACE PACKAGE PkgPartition IS
> > FUNCTION createPartition(paramPartName IN VARCHAR2) RETURN NUMBER;
> > PROCEDURE add(paramPartName IN VARCHAR2);
> > END PkgPartition;
> > /
>
> At first glance I notice the following:
>
> 1. Your IN parameter is a VARCHAR2, so you should be binding the
> parameter with adVarChar (200), not a adBSTR (8)
> 2. What is the "128" on your Execute line for?
>
> -- Tom
![]() |
![]() |