Results 1 to 6 of 6

Thread: Operation must use an updateable query. HELP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    113

    Angry Operation must use an updateable query. HELP

    Code:
    dim conn
    dom rs
    
    set conn=server.createobject("ADODB.connection")
    conn.open "db"
    set rs = server.createobject("ADODB.recordset")
    sqlq = insert into table1 (field1) values (1)
    set rs  conn.execute(sqlq)

    Hi,
    after the above code I get an erro
    Operation must use an updateable query.


    anyone know why?
    You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    The INSERT sql sent via Connection.Execute does not return any records, so you can't put the results into a recordset object.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    113

    ok but

    thanks...os what should I do to make it work?
    You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    113

    without the recordset im still getting same error

    [code]
    dim conn
    set conn=server.createobject("ADODB.connection")
    conn.open "db"
    sqlq = insert into table1 (field1) values (1)
    conn.execute(sqlq)

    [\code]

    still says i need an updateaBLE QUERY
    You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!

  5. #5
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Are you using quotes around your sql string?

    Code:
    sqlq = "insert into table1 (field1) values (1)"
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    South Africa
    Posts
    113

    server issue

    thanks but i do have quotes
    it must be a server issu cos i changed the tabl i am working with and put in in a db table that i know works. i then put th asp page in the directory of a project that i know works...nd voila it works now

    strange

    i think that after doing it wrong the first time the odbc data source got scrued
    You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!

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