Saturday, August 21, 2010

How to connect to Oracle 8i Database using ASP?

I have developed a database using Oracle 8i. I have also developed webpages using Macromedia Dreamweaver. I would like to connect my database to my webpages. I'm considering using ASP. Is this possible? And does anyone have sample codes regarding this? I have searched but have found very little on connecting to Oracle 8i. Thanx in advance :)How to connect to Oracle 8i Database using ASP?
%26lt;%


if len(Request.form(';txtSQL';)) %26gt; 0 then


dim cn, rs, i, cString





set cn = Server.CreateObject(';ADODB.Connection';)


set rs = Server.Createobject(';ADODB.Recordset';)





cString = ';DistribTx=0;Data Source='; %26amp; Request.form(';txtDbase';) %26amp; ';;User ID='; %26amp; Request.form(';txtUserID';) %26amp; ';;Password='; %26amp; Request.form(';txtPassword';) %26amp; ';;';








with cn


.Provider = ';ORAOLEDB.Oracle';


.Connectionstring = cString


.open


end with





dim sql


sql = Request.form(';txtSQL';)


rs.open sql, cn,3,3





if rs.eof = true then


Response.write ';No Data in recordset';


else


rs.movefirst


%%26gt;

No comments:

Post a Comment