Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303

    Arrow Unanswered: How To Lock Recordset From A Sql Statement

    'Multi User Application - I need help...
    'How TO LOCK RECORDSET <Table> FROM A SQL STATEMENT below to prevent from duplicate field value <Tsa.line>

    While Counter <= lV2.ListItems.Count
    Cn.Execute "Insert into Tsa(Cust_code,Line,Trn_date,prtcular," _
    & "Debit,Balance,REF,Status)" _
    & "Values('" & Lv.ListItems(Lv.SelectedItem.Index).SubItems(1) & "'," _
    & "'" & Table!number & "'," _ ' The problem with in this line...
    & "'" & lV2.ListItems.Item(Counter ) & "'," _
    & "'" & lV2.ListItems.Item(Counter ).SubItems(4) & "'," _
    & lV2.ListItems.Item(Counter ).SubItems(5) & "," _
    & lV2.ListItems.Item(Counter ).SubItems(6) & "," _
    & "'" & lV2.ListItems.Item(Counter ).SubItems(3) & "'," _
    & "'1')"

    ' And the line below
    Table!number = Format(CDbl(Table.Line) + 1, "0000000000")
    Table.Update
    Counter = Counter + 1
    Wend

    Is their any idea,suggestion or another solution to solve this problem?

    Thanks...
    Last edited by popskie; 12-09-04 at 22:26.

Posting Permissions

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