Results 1 to 4 of 4

Thread: Adding Record to *.mdb With ASP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    Well i'm troubled.

    I've created an ASP web site that's accessing an Access97
    Database and it works fine on my frontpage Server but on
    the my AtFreeWeb.com site when i'm trying to add record i
    have this Error MSG but a can read the database.


    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

    /Fin.asp, line 48


    At the line 48 i'm doing the update of the Recordset
    ~
    line 46 Recordset.AddNew
    line 47 Recordset("Field1") = Request("Field1")
    line 48 Recordset.update
    ~

    But on the webserver it gives me that Error while at home
    it works ok.

    Can someone help me?

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    personally I prefer to use the SQL INSERT command

    Code:
    strSQL = "INSERT into tablename(fieldname) VALUES ('" & data & "');"
    conn.Execute(strSQL)
    So sorry, I can't help!

    Mark
    -------------------

  3. #3
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696

    Unhappy

    hi dndstef

    From what I can remember, some hosting companies make all files read-only once they have been uploaded, to make it harder for would be hackers to change your site. This could be your problem.

    Hope this helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  4. #4
    Lively Member
    Join Date
    Jun 1999
    Location
    Garden Grove, CA, USA
    Posts
    110

    Hope this will help...

    I've came to the same problem with this once, but i don't know if you have the same problem. ASP input to MSAccess will regconized the """ and "'" to be special command for it. So you might want to add some codes which will change the """ to something like ":::" and "'" to something like ";;;" and then add to the database. when read to database you need some codes to change the ":::" and ";;;" back to """ and "'"...

    I hope this will help solve your problem...
    ngphuocthinh

Posting Permissions

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



Click Here to Expand Forum to Full Width