Results 1 to 2 of 2

Thread: error message

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    16

    error message

    please can someone tell me why i'm getting this error message, i've seen this befor but can not remember where!!!

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.


    Here is my code:

    <%

    Dim title, music_date, sub_title, LofScore, revised, First_performance, objcon, sqlinsert


    Function ChkString(string)
    If string = "" Then string = " "
    ChkString = Replace(string, "'", "''")
    End Function

    ' Receiving values from Form
    title = ChkString(Request.Form("title"))
    music_date = ChkString(Request.Form("m_date"))
    subt_title = ChkString(Request.Form("sub_title"))
    LofScore = ChkString(Request.Form("comments"))
    revised = chkstring(request.form("revised"))
    first_performance = chkstring(request.form("f_performance"))




    set objcon = server.createobject("adodb.connection")
    objcon.open "stravinsky"

    sqlinsert = "insert into music (title, sub_title, m_date, revised, lofscore, f_performance) values
    ('" & title & "', '" & sub_title &"', '" & music_date & "', '" & revides & "', '" & lofscore & "',
    '" & first_performance & "')"


    objcon.execute(sqlinsert)
    objcon.close
    set objcon = nothing
    response.write " the music details have been entered inti the database Thank You"



    %>

    thanks

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Your code looks ok except for:

    objcon.execute(sqlinsert)

    should be

    objcon.execute sqlinsert

    Unless the execute method is returning a recordset.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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