Results 1 to 7 of 7

Thread: Help again!! Update query problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Angry

    In big trouble here!!

    I'm dealing with dBase V files...I can get a ADO connection no problem I can run basic select queries over them. BUT if I try an update or insert query over them I get the following error!!

    - Operation must use an updatable query. -

    Any ideas how I can get around this and run my action queries...!

    Regards


    Gerard

  2. #2
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    gerard

    SOunds like your connection could be read only or something similar.

    Can you post the connection code
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Code

    Dim cn As ADODB.Connection
    Dim rs As ADODB.Recordset

    Set cn = New ADODB.Connection

    cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\data\dbffiles\;Extended Properties=Dbase IV"

    Set rs = cn.Execute("UPDATE NAMETBL SET NAMETBL.GIVENAME = 'Peter'")

    cn.Close
    Set cn = Nothing

  4. #4
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    gerard

    have you tried just running the query i.e

    Code:
    cn.Execute("UPDATE NAMETBL SET NAMETBL.GIVENAME = 'Peter'") 
    
    'instead of
    Set rs = cn.Execute("UPDATE NAMETBL SET NAMETBL.GIVENAME = 'Peter'")
    If you try that and it works you may have to set some properties of the recordset first.
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Angry Same message

    Tried your suggest get same error..not sure what rs properties I may need to set..

  6. #6
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621

    Unhappy

    Sorry gerard

    I can't think of anything that would cause the error.

    It sounds like the connection is read only which would explain why the select query works.

    I am not sure what properties you would have to set to make make sure the connection is read/write.

    I remember somone else having a similar problem a while back but I'm not sure if it was resolved.


    Come on guy's, li'l help
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Wink

    Thanks anyway!

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