Results 1 to 4 of 4

Help - linked MySQL table & VBA

  1. #1
    Leopolleke is offline Novice
    Windows XP Access 2003
    Join Date
    May 2018
    Posts
    4

    Help - linked MySQL table & VBA


    Hi,

    sorry, I'm stuck......
    I have a ms access (2003) database with local tables, and VBA scripts to edit and update the tables.
    So far, so good.
    Now I had the splendid idea to put some of the tables "online", meaning linked ODBC tables.
    I edit the tables like:
    t.edit
    t.[Name] = f![Name]
    t.[Address] = f![Address]
    .....
    t.update
    With the linked tables, the code stops with 'another user has changed the record'.
    I thought I found that when I change a field with the same content (a test table), the error occured.
    So I changed the code with tests, if equal do nothing, if not change the content of the field.
    While testing, this approach worked, but after chaning all my code, I get the same error.....
    Even though the fields are updated prior to the error (prior to the t.update) I don't know if it's ok to omit the t.update.

    I hope to get some help or tips here (without re-writing everything..)
    I admit I'm clumsy with programming, but everything worked fine with local tables.
    I hope to find out what I'm missing here.

    Appreciating any help.

    Leo

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    6,367
    use an update query.(or append)
    you dont need any code.

  3. #3
    Leopolleke is offline Novice
    Windows XP Access 2003
    Join Date
    May 2018
    Posts
    4
    Hi ranman256,
    it's not only code to edit and update, but also some input depending changing of data.....
    Thanks for the reply.

  4. #4
    Gicu is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    314
    Hi Leo,

    Can you edit the linked tables directly (open the table and edit a record)? What MySQL server version and MyODBC connector are you using? What options have you chosen in the connector (ODBC driver)? Have a look at this thread:
    https://forums.mysql.com/read.php?65...009#msg-257009

    Cheers,
    Vlad

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 01-26-2018, 02:52 AM
  2. Linked tables on Mysql Database
    By sdel_nevo in forum Programming
    Replies: 5
    Last Post: 04-27-2016, 01:12 PM
  3. How to write data into linked MySQL table
    By mr.viskers in forum Programming
    Replies: 5
    Last Post: 03-13-2015, 01:51 AM
  4. linked mysql database
    By nkuebelbeck in forum Misc
    Replies: 3
    Last Post: 05-30-2013, 08:58 AM
  5. Replies: 5
    Last Post: 05-15-2012, 11:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums