Update Query.. asp/access db

Discussion in 'ASP General' started by netje, Sep 10, 2003.

  1. netje

    netje Guest

    Hi,

    Does anybody know what this error is about?

    ____

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable
    query.

    /app/admin/admin.asp, line 201

    _____



    many thanks!



    wilbert
     
    netje, Sep 10, 2003
    #1
    1. Advertising

  2. netje

    netje Guest

    sorry forgot this:

    some of the code:

    ____

    If u_action <> "add" then



    select case u_action

    case "insert"

    sql = "insert into news (title,body,author,insert_date)"

    sql = sql & " values( '" & u_title & "' , '" & u_body & "' , '" & u_author &
    "' , #" & u_date & "#)"


    case "display"

    sql="select * from news where id="&u_id

    case "delete"

    sql="delete from news where id="&u_id

    case "edit"

    sql="select * from news where id="&u_id

    case "logout"

    session("password") = ""

    case "update"

    u_id=request.form("u_id")

    sql = "UPDATE news SET title='" & u_title & "',"

    sql = sql & " body='" & u_body & "',"

    sql = sql & " insert_date=#" & u_date & "#,"

    sql = sql & " author='" & u_author & "'"

    sql = sql & " WHERE id="&u_id

    case else

    sql="select * from news order by insert_date desc "

    end select



    accessdb="../db/db_sdp.mdb"

    cn="driver={Microsoft Access Driver (*.mdb)};"

    cn=cn & "dbq=" & server.mappath(accessdb)

    Set rs = Server.CreateObject("ADODB.Recordset")

    (Line 201) rs.Open sql, cn



    I have been working with it, but after changing some small things and moving
    to a different server it don't work anymore!

    bye Wilbert
     
    netje, Sep 10, 2003
    #2
    1. Advertising

  3. netje

    rick watkins Guest

    Have you checked if your database on the folder its in have the correct
    pemission settings
    i.e. read/write access

    I think that should solve it for you.


    "netje" <> wrote in message
    news:3f5ed5de$0$28911$...
    > sorry forgot this:
    >
    > some of the code:
    >
    > ____
    >
    > If u_action <> "add" then
    >
    >
    >
    > select case u_action
    >
    > case "insert"
    >
    > sql = "insert into news (title,body,author,insert_date)"
    >
    > sql = sql & " values( '" & u_title & "' , '" & u_body & "' , '" & u_author

    &
    > "' , #" & u_date & "#)"
    >
    >
    > case "display"
    >
    > sql="select * from news where id="&u_id
    >
    > case "delete"
    >
    > sql="delete from news where id="&u_id
    >
    > case "edit"
    >
    > sql="select * from news where id="&u_id
    >
    > case "logout"
    >
    > session("password") = ""
    >
    > case "update"
    >
    > u_id=request.form("u_id")
    >
    > sql = "UPDATE news SET title='" & u_title & "',"
    >
    > sql = sql & " body='" & u_body & "',"
    >
    > sql = sql & " insert_date=#" & u_date & "#,"
    >
    > sql = sql & " author='" & u_author & "'"
    >
    > sql = sql & " WHERE id="&u_id
    >
    > case else
    >
    > sql="select * from news order by insert_date desc "
    >
    > end select
    >
    >
    >
    > accessdb="../db/db_sdp.mdb"
    >
    > cn="driver={Microsoft Access Driver (*.mdb)};"
    >
    > cn=cn & "dbq=" & server.mappath(accessdb)
    >
    > Set rs = Server.CreateObject("ADODB.Recordset")
    >
    > (Line 201) rs.Open sql, cn
    >
    >
    >
    > I have been working with it, but after changing some small things and

    moving
    > to a different server it don't work anymore!
    >
    > bye Wilbert
    >
    >
    >
     
    rick watkins, Sep 10, 2003
    #3
  4. netje

    netje Guest

    Yes, that will be it...

    I contacted my hostingprovider.. they have to change that for me..

    did'nt now that! i'm used to work on a unix-server...

    Bye

    Wilbert

    "rick watkins" <> schreef in bericht
    news:...
    > Have you checked if your database on the folder its in have the correct
    > pemission settings
    > i.e. read/write access
    >
    > I think that should solve it for you.
    >
    >
    > "netje" <> wrote in message
    > news:3f5ed5de$0$28911$...
    > > sorry forgot this:
    > >
    > > some of the code:
    > >
    > > ____
    > >
    > > If u_action <> "add" then
    > >
    > >
    > >
    > > select case u_action
    > >
    > > case "insert"
    > >
    > > sql = "insert into news (title,body,author,insert_date)"
    > >
    > > sql = sql & " values( '" & u_title & "' , '" & u_body & "' , '" &

    u_author
    > &
    > > "' , #" & u_date & "#)"
    > >
    > >
    > > case "display"
    > >
    > > sql="select * from news where id="&u_id
    > >
    > > case "delete"
    > >
    > > sql="delete from news where id="&u_id
    > >
    > > case "edit"
    > >
    > > sql="select * from news where id="&u_id
    > >
    > > case "logout"
    > >
    > > session("password") = ""
    > >
    > > case "update"
    > >
    > > u_id=request.form("u_id")
    > >
    > > sql = "UPDATE news SET title='" & u_title & "',"
    > >
    > > sql = sql & " body='" & u_body & "',"
    > >
    > > sql = sql & " insert_date=#" & u_date & "#,"
    > >
    > > sql = sql & " author='" & u_author & "'"
    > >
    > > sql = sql & " WHERE id="&u_id
    > >
    > > case else
    > >
    > > sql="select * from news order by insert_date desc "
    > >
    > > end select
    > >
    > >
    > >
    > > accessdb="../db/db_sdp.mdb"
    > >
    > > cn="driver={Microsoft Access Driver (*.mdb)};"
    > >
    > > cn=cn & "dbq=" & server.mappath(accessdb)
    > >
    > > Set rs = Server.CreateObject("ADODB.Recordset")
    > >
    > > (Line 201) rs.Open sql, cn
    > >
    > >
    > >
    > > I have been working with it, but after changing some small things and

    > moving
    > > to a different server it don't work anymore!
    > >
    > > bye Wilbert
    > >
    > >
    > >

    >
    >
     
    netje, Sep 11, 2003
    #4
  5. netje

    Mario b. Guest

    Hi

    Check your web directory security.



    "netje" <> wrote in message
    news:3f5ed4ba$0$28896$...
    > Hi,
    >
    > Does anybody know what this error is about?
    >
    > ____
    >
    > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    > [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable
    > query.
    >
    > /app/admin/admin.asp, line 201
    >
    > _____
    >
    >
    >
    > many thanks!
    >
    >
    >
    > wilbert
    >
    >
    >
     
    Mario b., Sep 12, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Tm92aWNlIGF0IHdvcms=?=

    UPDATE query in ASP.NET

    =?Utf-8?B?Tm92aWNlIGF0IHdvcms=?=, Sep 28, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    8,644
    Kevin Spencer
    Sep 29, 2004
  2. Eric Nelson
    Replies:
    5
    Views:
    1,538
    Alexey Smirnov
    Feb 4, 2009
  3. Bart Plessers \(artabel\)
    Replies:
    1
    Views:
    138
    Ray at
    Jul 17, 2003
  4. David Shorthouse

    Update query doesn't update table

    David Shorthouse, Jun 17, 2005, in forum: ASP General
    Replies:
    6
    Views:
    262
    David Shorthouse
    Jun 17, 2005
  5. Roland Hall

    ASP LIKE query using parameterized query

    Roland Hall, Jan 12, 2007, in forum: ASP General
    Replies:
    8
    Views:
    226
    Roland Hall
    Jan 13, 2007
Loading...

Share This Page