Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2004
    Posts
    41

    Unanswered: Problems connecting to an Access DB

    I am using the following code snippet to connect to an Access db. What am I doing wrong?

    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open(Server.Mappath("personal.mdb;UID=;PWD=12 34"))

    It responds with the error:

    "Microsoft JET Database Engine error '80004005'

    Could not find installable ISAM."


    I set the password thru Access; it did not mention any user ID.

    Any help is appreciated. Thanks.

  2. #2
    Join Date
    Dec 2003
    Posts
    454
    Try this:

    Set conn=Server.CreateObject("ADODB.Connection")
    connString = "Microsoft.Jet.OLEDB.4.0; Data Source=FilePath; UID=userID;PWD=password"
    conn.ConnectionString = connString
    conn.Open

  3. #3
    Join Date
    Feb 2004
    Posts
    41
    That didn't appear to help.

    Let me expound further.

    I am able to connect to the Access db using these lines:

    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open(Server.Mappath("personal.mdb"))

    I can read data from the tables, but when i try and delete a row using the following code snippet i get and error:

    "No update permissions!"

    This is the code:

    [i]<%
    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open(Server.Mappath("costa.mdb"))
    set rs = Server.CreateObject("ADODB.recordset")
    rs.open "SELECT * FROM plant_list", conn
    sql="DELETE FROM plant_list"
    sql=sql & " WHERE plant_id='" & request.QueryString("entry") & "'"
    on error resume next
    conn.Execute sql
    if err<>0 then
    response.write("No update permissions!")
    else
    response.write("Record " & request.QueryString("entry") & " was deleted!")
    end if
    conn.close
    %>[i]

    I assumed that maybe the file permissions were not set on the server. But upon firther examination, they are set "777". So I thought it might be a db error.

    Please help. Thanks.

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    instead of

    response.write("No update permissions!")

    why don't you

    response.write err.description

    ??

  5. #5
    Join Date
    Feb 2004
    Posts
    41
    Ok I did that. It may have narrowed down the problem

    Now I get this error:

    "Could not delete from specified tables."

    My query string is this:

    DELETE FROM plant_list WHERE plant_id=18

    I verified that the table "plant_list" does exist and that the field name "plant_id" also exists, and that a field does contain the number 18.

    Where have I erred?

  6. #6
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    In the Web site's control panel give the folder containing the database more permissions than just read.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  7. #7
    Join Date
    Feb 2004
    Posts
    41
    I checked that first actually... the file has 7's across the board. But thanks.

  8. #8
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    what happens if you try and run that delete query in the access db??

  9. #9
    Join Date
    Feb 2004
    Posts
    41
    On my local machine when I run the following query,

    DELETE FROM plant_list WHERE plant_id=18

    It deletes the one run, no problem.

  10. #10
    Join Date
    Jul 2003
    Location
    Penang, Malaysia
    Posts
    212
    I am having a similar problem....


    this is my error message:

    "No update permissions!-2147467259"


    I did it in my local pc...everything is okay...ftp the files to the host server....damn!


    What I need to do??
    Patrick Chua
    LBMS ( Learn By My Self) NPQ ( No paper Qualification )

  11. #11
    Join Date
    Dec 2003
    Posts
    454
    I think that this is the database permission problem. Since you do not have UID I suggest you to create Login which is used for your ASP connection. At that point, you can give READ and WRITE permission to it.

  12. #12
    Join Date
    Feb 2004
    Posts
    41
    I removed the password through Access.

    I still get the,

    "Could not delete from specified tables."

    error.

    I can run the query without problem through access on my local machine.

    How do I create Login which is used for my ASP connection?

    Any help is appreciate, thanks.

Posting Permissions

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