connecting problem
what do i need to connect the oracle 8i using asp code . i got the code and it connected and after time it didn't work i used the MSDAORA provider . do i need a special program or something to use different provider or what i hope that sone one will help me in this because am in need of this help for my project .
i used this code and it was fine but after i install the oracle form developer it didn't work . should i use the same of the database in the form developer .
<HTML>
<HEAD>
<TITLE>Connecting to an Oracle database using OLE and DSNLess connection</TITLE>
</HEAD>
<BODY>
<%
SET myConn=SERVER.createobject("adodb.connection")
myConn.Open "Provider=MSDAORA; Data Source=db1;" & _
"User ID=scott;" & "Password=tiger"
SQLStr="SELECT empno, ename, deptno FROM Emp ORDER BY deptno, ename"
SET result=myConn.execute(SQLStr)
IF NOT result.EOF THEN
response.write("<H2>Oracle ASP Example</H2>")
response.write("<P>Connecting to Oracle using OLE & DSNLess connection</P>")
response.write("<TABLE BORDER=3 BGCOLOR=#0099CC><TR>" & _
"<TH>Employee No</TH><TH>Name</TH><TH>Department No</TH>")
WHILE NOT result.EOF
response.write("<TR><TD>" & result("empno") & "</TD>")
response.write("<TD>" & result("ename") & "</TD>")
response.write("<TD>" & result("deptno") & "</TD></TR>")
result.movenext()
WEND
response.write("</TABLE>")
ELSE
response.write("<P>Error retrieving Employee data!!</P>")
END IF
%>
</BODY>
</HTML>
Peace
|