Results 1 to 2 of 2

Thread: Insert problem.

  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Unanswered: Insert problem.

    Hellow...
    I am useing asp/VBscript for inserting into table in oracle. I hope that i will get the solution here.
    I am getting the error that - (at line no. 46 i.e at RS1.update
    "Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC driver for Oracle][Oracle]ORA-01722: invalid number
    /addrecords_tel.asp, line 46 "

    my table details is --
    Table name - "adm_tel_remb_detail"
    Name Null? Type
    ------------------------------- -------- ----
    EMP_NO NOT NULL NUMBER(5)
    DESIGN_CODE CHAR(3)
    BCCC_CODE CHAR(5)
    BANK_CODE NUMBER(5)
    BANK_NAME VARCHAR2(40)
    ACCOUNT_NO VARCHAR2(15)
    TELEPHONE_LOCATION NOT NULL CHAR(1)
    TELEPHONE_NO NOT NULL NUMBER
    BILL_NO VARCHAR2(20)
    BILL_DATE NOT NULL DATE
    BILL_PERIOD_FROM DATE
    BILL_PERIOD_TO DATE
    PREVIOUS_READING NUMBER
    CURRENT_READING NUMBER
    RENTAL_CHARGES NUMBER(10,2)
    SERVICE_CHARGES NUMBER(5,2)
    CALL_CHARGES NUMBER(10,2)
    OTHER_CHARGES NUMBER(12,2)
    OTHER_DEBIT NUMBER(10,2)
    OTHER_CREDIT NUMBER(10,2)
    TOTAL_AMOUNT NOT NULL NUMBER(15,2)
    SANCTIONED_AMOUNT NOT NULL NUMBER(12,2)
    PAYMENT_DOC_REF VARCHAR2(10)
    PAYMENT_DOC_DATE DATE
    CREATED_BY VARCHAR2(15)
    CREATED_DATE DATE
    MODIFIED_BY VARCHAR2(15)
    MODIFIED_DATE DATE
    POSTED_BY VARCHAR2(15)
    POSTED_DATE DATE
    RECORD_STATUS CHAR(1)

    Code is given below ...


    <%@ LANGUAGE = VBScript %>
    <%
    Dim RS1,Con
    Set Con = Server.CreateObject("ADODB.Connection")
    Con.Mode = adModeReadWrite
    Con.Open "DATA SOURCE=att; UID=FMSTEST; PWD=fms"
    set RS1 = Server.Createobject("adodb.recordset")
    RS1.open "ADM_TEL_REMB_DETAIL",Con,adOpenStatic,3
    RS1.addnew
    RS1("EMP_NO") = request.form("Emp_Number")
    RS1("DESIGN_CODE") = ""
    RS1("BCCC_CODE") = ""
    RS1("Bank_name") = request.form("Bank_name")
    RS1("ACCOUNT_NO") = request.form("Bank_accno")
    RS1("TELEPHONE_LOCATION") = "R"
    RS1("Telephone_no") = request.form("Tel_no")
    RS1("Bill_no") = request.form("Bill_no")
    RS1("Bill_date") = request.form("Bill_date")
    RS1("Bill_PERIOD_from") = request.form("Bill_from")
    RS1("Bill_PERIOD_to") = request.form("Bill_to")
    RS1("Previous_reading") = request.form("Prev_reading")
    RS1("Current_reading") = request.form("Curr_reading")
    RS1("RENTAL_CHARGES") = request.form("Rent_ch")
    RS1("SERVICE_CHARGES") = request.form("Serv_ch")
    RS1("CALL_CHARGES") = request.form("Call_ch")
    RS1("OTHER_CHARGES") = request.form("Other_ch")
    RS1("Other_debit") = request.form("Other_debit")
    RS1("Other_credit") = request.form("Other_credit")
    RS1("TOTAL_AMOUNT") = request.form("Total_amt")
    RS1("SANCTIONED_AMOUNT") = request.form("Sanction_amt")
    RS1("PAYMENT_DOC_REF") = ""
    RS1("CREATED_BY") = request.form("Emp_Number")
    RS1("MODIFIED_BY") = ""
    RS1("POSTED_BY") = ""
    RS1("RECORD_STATUS") = "U"
    RS1.update
    RS1.Close
    Set RS1 = Nothing
    %>

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191

    just a thought....

    I am not familiar with oracle at all... but I would approach this issue by systematically eliminating lines 1 at a time, until the error went away, to see which field is causing the error. That might help you narrow down the cause.
    Tim

Posting Permissions

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