Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Batch update linked tables

Batch update linked tables

Scheduled Pinned Locked Moved Visual Basic
helpquestiondatabaseannouncementcode-review
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mattias Wahlberg
    wrote on last edited by
    #1

    Hello fellow developers! I have a problem. I am trying to optimize some database transfer code and I am stuck. Here is a brief introduction to what I have today: The database is a Jet 3.5 database with a lot of tables. The tables I want to update are linked together like this (PK): Shelf(ShelfNr)-->Inventory(ShelfNr,ArticleNr)<--Article(ArticleNr). ArticleNr is a unique number but ShelfNr is based on an auto-counter field. The problem with this that I cant use batch updates (through an ODBCDirect workspace) and at the same time use code like this: ' Pseudo VB-code rsShelfTo.AddNew ' copy all fields except key rsShelfTo.Fields = rsShelFrom.Fields rsShelfTo.Update rsShelfTo.Bookmark = rsShelfTo.LastModified ' CurrentShelf always gets the value 0 with this code, why? CurrentShelf = rsShelfTo.Fields("ShelfNr") I would like to include all updates in a transaction some my question is can I switch between using dbUseClientBatchCursor and dbUseDefaultCursor and still keep the transaction alive? Any ideas? -- Mattias Wahlberg IDNet

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups