Thread: help plz....

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12

    Unhappy help plz....


    anyone know what's wrong with this script...?
    I'm trying to access a database on my pc ...I get the error invalid class string...?

    any ideas...

    PHP Code:
    <% 
    strQuery "SELECT * FROM Employees"
    strProvider "DRIVER = MISCROSOFT ACCESS DRIVER(*.mdb);dbq=" "c:\data\Northiwind.mdb"
    Set rst Server.CreateObject("ADODB RECORDSET")
    rst.open strQuerystrProvider%>
    <
    table border=0 cellpadding=0 cellspacing=10>
    <
    th>First Name</th>
    <
    tr>
    <
    td><%=FirstName%></td>
    </
    tr>
    </
    table
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    ok...one problemsolved, I needed a period between ADODB and RECORDSET...did that and now new errors arise....argh...

    I am now getting this error:
    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    /bus106/carlosAssgn2.asp, line 22

    and the line of code is:
    rst.open strQuery, strProvider

    any thoughts on this?
    Last edited by IBM; April 10th, 2003 at 01:01 PM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    ???

    anyone???
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Canada - Egypt
    Posts
    60
    Rep Power
    12
    Normally the driver parameter is used in this format

    "Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\somepath\mydb.mdb;"

    I am not sure if the brackets make a big difference

    Also make sure the Drivers really exist on your server.
    I hope this is of any help to anyone.

    Yassoor
    http://www.WebsitesCreation.ca
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    Thank you

    I'll have to check on that next wed....But will come back and read what you suggested. Thanks again.

IMN logo majestic logo threadwatch logo seochat tools logo