Results 1 to 2 of 2

Thread: Transaction entry problem (VB.NET+SQL Server 2K)

  1. #1

    Thread Starter
    Fanatic Member sbasak's Avatar
    Join Date
    Aug 2001
    Location
    Globe Trotter
    Posts
    524

    Unhappy Transaction entry problem (VB.NET+SQL Server 2K)

    I am having a problem inserting data.

    I have two SQL Server tables

    Trans -> TranNo (auto number), CustNo, StoreNo etc.
    TransDetail -> TranNo (foreign key from Trans.TranNo), TranDetailNo (auto number), ProdCode, Quantity

    I have made a master-detail form in VB.NET using data form wizard.

    The problems are:

    1. I can't enter data in the two tables at same time. First I need to save the master data and then only I can enter children data (unlike in D2K Forms).

    2. Since Trans.TranNo is an identity (auto number) field, if more than one instances of same form is used to insert date, concurrency problem arises.

    Can anyone throw any light?

    Lots of thanx in advance!
    Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
    Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.

  2. #2

    Thread Starter
    Fanatic Member sbasak's Avatar
    Join Date
    Aug 2001
    Location
    Globe Trotter
    Posts
    524
    I thought of a solution. If I make the primary key column as GUID, then probably the concurrency problem wouldn't be there as there will be very rare chance of generating duplicate keys between disconnected instances of datasets.

    Any idea??
    Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
    Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.

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