Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    india
    Posts
    2

    Question Unanswered: Database connection in asp

    Hi ASP Experts,

    Can u solve this problem. I work in a network. The code for connecting to a database is given below:
    <%
    set con=server.createobject("adodb.connection")
    con.open "Driver={microsoft access driver (*.mdb)}; uid=;pwd=; dbq=" &

    server.mappath("trc.mdb")
    set rs=server.createobject("adodb.recordset")
    qry="select * from imm_projects;"
    rs.open qry,con%>

    I don't want to use dsn.
    I get the following error:

    Error Type:
    Provider (0x8000FFFF)
    Catastrophic failure
    /trc/t-projects.asp, line 10


    Thanks in advance
    sankari

  2. #2
    Join Date
    Jan 2003
    Posts
    6
    Please put the full code.

  3. #3
    Join Date
    Jan 2003
    Location
    india
    Posts
    2

    database connection in asp

    <html>
    <BODY alink="#ff0000" vlink="yellow" link="blue" BGCOLOR="" BACKGROUND="images\backgrnd.gif" leftmargin="0" topmargin="10" rightmargin="0">

    <%
    set con=server.createobject("adodb.connection")
    con.open "Driver={microsoft access driver (*.mdb)}; uid=;pwd=; dbq=" & server.mappath("trc.mdb")
    set rs=server.createobject("adodb.recordset")
    qry="select * from imm_projects;"
    rs.open qry,con
    recno=0
    while not rs.eof
    recno=recno+1
    %>


    <style>
    td {align: justify;} p {align: justify;}
    </style>

    <STYLE>
    .txtBox
    {
    BORDER-BOTTOM: #0061A0 solid 1px;
    BORDER-LEFT: #0061A0 solid 1px;
    BORDER-RIGHT: #0061A0 solid 1px;
    BORDER-TOP: #0061A0 solid 1px;
    }
    </style>

    <table border="0" width="90%" cellspacing="0" cellpadding="0">

    <tr><td width="50%"></td>
    <td align=right><a href="content1.asp"><img src="images\demo1.jpg"></a></td>
    <td align=right><a href="prodhome1.asp"><img src="images\demo1.jpg"></a></td>
    </table>
    <br>
    <br>
    <table>
    <td width="25%" valign=top>
    <table height="55%">

    <tr><td width="10%"><img src="images\1.jpg"></a></td></tr>
    <tr><td width="10%"><a href="t-publications.asp"><img src="images\2.jpg"></a></td></tr>
    <tr><td width="10%"><a href="t-staff.asp"><img src="images\3.jpg"></a></td></tr>


    </table>
    </td>
    <td width="55%" align=center valign="top">

    <table align=center width="100%" height="50%" border="2" cellspacing="2" cellpadding="2">
    <tr><td colspan=4 width="80%" align="center"><b><font face="ms serif" size=+2>Immunology - Projects &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;</b></td></tr>
    <tr><td width="10%">Code</td><td width="10%">Name</td><td width="20%">Project Incharge</td><td>Project Details</td></tr>

    <tr><td><%=rs("proj_code")%></td><td><a href><%=rs("proj_name")%></a></td><td><%=rs("proj_incharge")%></td><td><%=rs("proj_details")%></td></tr>
    <%rs.movenext
    wend%>
    </table>

    </td>


    </table>

    <%rs.close
    set rs=nothing
    set con=nothing
    %>

    </body>
    </html>
    hilalbrk@emirates.net.ae

  4. #4
    Join Date
    Jan 2003
    Posts
    23
    Have you check to make server.mappath("trc.mdb") is providing the correct path to your file?

Posting Permissions

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