Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Unanswered: oracle 8i connecting problem

    After the code has worked ,now it is not any more althought that i change nothing in it . after i install the oracle developer for the form i can't connect to the oracle tables i have tried alot of other provider i don't know what is wrong with the code . does the developer change something. i have named the database in the developer with other name not like the database name . am using the server and everything is here . do i need special program or provider for that .



    <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>

  2. #2
    Join Date
    Mar 2004
    Location
    chennai
    Posts
    25
    hi

    what error u r getting....
    in data source field u give the name of the server's system name.

    whether the data source name db1 is correct or not.just check once..
    Sakthi

Posting Permissions

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