0 Replies Latest reply: Nov 15, 2011 1:40 AM by 773278 RSS

    Inserting data in oracle database using ASP.

    773278
      hi all.

      i am using oracle database 11g R2,windows xp,ASP.
      i am able to store texts and numbers but i am not able to store image in blob.
      here is my table structure.
      Roll number
      Name varchar2(20)
      Subject varchar2(20)
      Marks number
      Attach Blob
      my problem is in blob i am not able to insert image into database using ASP codes.
      here is the code.
      <%
      Dim conn,recset 
      
      
      
      set conn=server.CreateObject("ADODB.connection")
      set recset=server.CreateObject("ADODB.recordset")
      'set conn=Server.CreateObject("ADODB.Connection")
       conn.Provider="MSDAORA;Data Source=orcl;User ID=XXXX;Password=XXX"
      
      
      conn.Open(conn) 
      
      Dim r,n,s,m,att
      
      r=upload.Form("roll")
      n=upload.Form("nam")
      s=upload.Form("sub")
      m=upload.Form("mark")
      att=upload.Form("FILE1")
      
      Response.Write "Succssfully Inserted"
      conn.execute "insert into table1 values('"&r&"','"&n&"','"&s&"','"&m&"','"&file1&"')"
      conn.close
      
      %>
      plz guide me and help me out.

      thanks in advance..