ASP and Oracle PL/SQL

Results 1 to 2 of 2

Thread: ASP and Oracle PL/SQL

  1. #1
    Rohit Dhing Guest

    Default ASP and Oracle PL/SQL

    Hi! Well I am new to Oracle and I am having trouble using the stored procedures in Oracle. Lets get my problem straight: <BR><BR>I have this proceudre in the package body called insert_into_form_general. What this procedure basically does is that it returns the record no of the current record and also does a insert into the table called FORM_GENERAL. The procedure takes in firstname, last name, phone, comment and they are coming in as VARCHAR2. I also have a output variable that returns the record no for the current record and it is returned as a NUMBER. Here is the definition of my procedure: <BR><BR>PROCEDURE INSERT_FORM_GENERAL( fname_in IN VARCHAR2, lname_in IN VARCHAR2, phone_in IN VARCHAR2, comment_in IN VARCHAR2, id_out OUT NUMBER)<BR>IS <BR>NEW_ID_GENERAL INTEGER; <BR>BEGIN <BR><BR>SELECT FORM_GENERAL_ID_SEQ.CURRVAL INTO NEW_ID_GENERAL FROM DUAL; <BR>id_out := NEW_ID_GENERAL + 7; <BR><BR>INSERT INTO FORM_GENERAL (FIRST_NAME,LAST_NAME,PHONE,COMMENTS) VALUES (site_in,fname_in,lname_in,phone_in,comment_in); <BR>END; <BR><BR>Now in my ASP code I have a form that takes in firstname, lastname...blah...blah..and when the user hits the submit button it takes him to a new asp page where the above procedure is called. The firstname , lastname are stored into the variable FNAME, doing a request.form and the same is done for comment and phone. And this is how I call the procedure: <BR><BR>Set Comm = Server.CreateObject("ADODB.Command") Set comm.ActiveConnection = Session("Conn") comm.commandtype=4 comm.commandtext = "PACK_DIAG.INSERT_FORM_GENERAL(FNAME,LNAME,PHONE,C OMMENT,OUTPUT_VAR)" comm.execute <BR><BR>When this code is executed I get an error saying Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Oracle][ODBC][Ora]ORA-06550: line 1, column 37: PLS-00201: identifier &#039FNAME&#039 must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored <BR><BR>/ap_diag/County/form_general2.asp, line 43 <BR><BR>Well, got any suggestion that can help me out??????? <BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP and Oracle PL/SQL

    I think this is the problem, you are referring to the variables inside of quotes, so the variables are not getting populated. You could do a response.write comm.commandtext to see. I think it should be like this. You may also have to enclose each within &#039s. If so, just insert them inside the "&#039s (front and back).<BR><BR>comm.commandtext = "PACK_DIAG.INSERT_FORM_GENERAL(" & FNAME & "," & LNAME & "," & PHONE & "," & COMMENT & "," & OUTPUT_VAR & ")" <BR><BR>HTH<BR><BR>Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts