Operation must use an updateable query.

  • 16 years ago

    hello


    i keep getting this error on my database, when it is on my computer and when i have uploaded it.

    Quote:
    Operation must use an updateable query.


    does anyone know what could cause such an error


    it is shown when u do any UPDATE or INSERT statements to the db, really if u try to modify the db it says that


    Thanks for your time

  • 16 years ago

    its because of the database write permissions...


    if you open any MS Ac DB do you notice the ldb(Access Recording Locking Information file) being created? well that is the same thing required when your using it on your site... so you need to permission the folder(recommended only if its the only file in there) to have write permissions.


    The reason why it may occur after reupping is because hte permissions are modified/overwritten when you uplaod new files. so if thers nothing other than the DB file in the directory i suggest you allow the right permissions to that folder.

  • 16 years ago

    P.S. I'm hearing about the Dengu thing over there... is it seriously bad as they say?

  • 16 years ago

    ok, but the problem is that it does that on my computer as well.
    it creates the *.ldb file when i open the db using access.
    so i don't know why it says that because i have full permissions on my http://localhost address


    thanks for your time


    sorry i don't knwo what you are talking about when you sais 'Dengu'; is that the pneumina?

  • 16 years ago

    windoze did something wrong i think


    i has full permission for 'Adminitrators' but only read & execute for 'Everyone', i cannot see why that would effect if because i am logged in as admin aka adminstator


    Thanks for your help, i didn't even know that would effect it

  • 16 years ago

    could i ask another question to do with dbs
    i want to get the id of the item added can i use a line like

    Code:
    Set objMovie = objConn.Execute ("INSERT INTO movies_movies (catid,title,author,[date],comments,width,height) VALUES (" & oFileUp.Form("catid") & ",'" & oFileUp.Form("title") & "'," & Session("id") & ",#" & Date & "#,'" & oFileUp.Form("comments") & "'," & oFileUp.Form("width") & "," & oFileUp.Form("height") & ")")

    Thanks

  • 16 years ago

    Quote:
    sorry i don't knwo what you are talking about when you sais 'Dengu'; is that the pneumina?

    hmmm okay then it could be that then (in Cairns)...


    what Windows OS arey ou running? Make sure IIS is allowed to WRITE permit to the direcotry the file is located too!

  • 16 years ago

    and for your other question... when you mean ID of the item, your refering to the table field ID or something else(?)?


    if you are then yes you can...


    Simply do:


    ObjMovie.Fields("ID").Value


    This is because the ObMovie is considered a RecordSet(what the Execute will return set the objMovie as) so you can use that.

  • 16 years ago

    Hey


    i still don't know what you are talking about when you say 'Dengu', sorry


    Yes that is what i was asking, the field value because it is an AutoNumber field
    I have the following code but i get an error

    Code:
    Line28|Set objMovie = objConn.Execute ("INSERT INTO movies_movies (catid,title,author,[date],comments,width,height) VALUES (" & oFileUp.Form("catid") & ",'" & oFileUp.Form("title") & "'," & Session("id") & ",#" & Date & "#,'" & oFileUp.Form("comments") & "'," & oFileUp.Form("width") & "," & oFileUp.Form("height") & ")")
    Line29|Response.Write objMovie.Fields("id").Value

    Quote:
    Error Type:
    ADODB.Recordset (0x800A0CC1)
    Item cannot be found in the collection corresponding to the requested name or ordinal.
    /stickkiller/movieupload.asp, line 29


    Thanks for your help, i do have another question but i will ask you after this one.

  • 16 years ago

    also i am using Win2k Pro w/ IIS, i don't know the version but i have applied Win2k sp2.

  • 16 years ago

    hey,


    sorry for the delays in replying, my daily emails are increasing but hte time i have to spend repsoding is decreasing because of Uni and i'm now starting to do my MCSE for Windows 2000 for which my parents didnt let me do a year after i concluded testing the gold release(studies etc)... so its going to get even busier(ohhh yaaayyY!)


    about your thingy!


    about your error... firstly you have to see if its the second line(line 29) thats causing the issue or is it the SQL code.. so without the 29th line run it and see if its all good.. then try it with 29 and see if it causes the error...


    I'm certain that the executte statement returns a RecordSet as i've done something like this before.

  • 16 years ago

    np, i can wait, i don't come on much anyway: about every night.


    the sql statement works because that is what i had there b4
    it could be because when inserting the fields the id field is not inserted so it isn't "select"ed for the recoredset


    Thanks for all your help

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves” - Alan Kay