locking tables-help please

Results 1 to 2 of 2

Thread: locking tables-help please

  1. #1
    user Guest

    Default locking tables-help please

    locking tables-help please<BR>user - 10 Jul - 10:40:08 AM<BR>--------------------------------------------------------------------------------<BR>Hi everyone!<BR>I have a table. the table has three columns, CustomerName,totalads,totalIncome<BR><BR>I am trying to insert a record into this table.<BR><BR>If the particular CustomerName is already found , I just need to update the other two columns totalads,totalIncome.<BR><BR>If the CustomerName column is not found, then I need to insert a whole new row.<BR><BR>Also, I need to use the lock options in the table, so that no two users can try to update the table at the same time.<BR>how will I do this?<BR><BR>Any help will be appreciated. <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: locking tables-help please

    cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:msdbsiblio.mdb;Mode=Share Deny Write;Persist Security Info=False"<BR><BR>cn.Open<BR>rs.Open "Select * from table where CustomerName = " & whoever<BR>if (rs.EOF) then<BR>rs.Addnew<BR>rs("CustomerName") = customername<BR>rs("totalads") = numberofads<BR>rs("totalIncome") = totalincome<BR>else<BR>rs("totalads") = numberofads<BR>rs("totalIncome") = totalincome<BR>end if<BR>rs.update

Posting Permissions

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