Results 1 to 6 of 6

Thread: Inserting to Multiple Tables

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Actually, I'd like to amend that a bit. IF you are using a database engine which supports update-able views, and your view meets the constraints the engine places on such views (like all fields present and a one-to-one relationship between the view and all the constituent tables, for example), then you *may* be able to accomplish it with one insert without using the trigger trick.

    Now, whether Delphi 2010 supports that via its database components, I am not sure (I don't own 2010, so can't speak to it). However, it is a pointless exercise if your database engine doesn't support it.

    Edit: Just as a sample, here are MySQL's restrictions on update-able views
    Last edited by Murmandamus; 02-02-2011 at 06:25 PM. Reason: added MySQL example

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •