Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Inserting data in oracle database using ASP.

773278Nov 15 2011
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..

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 13 2011
Added on Nov 15 2011
0 comments
337 views