I need an adLockPessimistic sample

Results 1 to 2 of 2

Thread: I need an adLockPessimistic sample

  1. #1
    Luca Parodi Guest

    Default I need an adLockPessimistic sample

    I have to display some data to a user (on a html form) and then apply the changes to the underlayng database.<BR>In this elapse of time I want to apply a pessimistic lock to prevent conflicts.<BR>How can I do this ?<BR><BR>This code don&#039;t work :<BR>&#060;%<BR>Dim objConn<BR>Dim objRs <BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>Set objRs = Server.CreateObject("ADODB.Recordset")<BR><BR>objC onn.ConnectionString = "driver={SQL Server};server=GENT57;uid=sa;pwd=;database=REPORTS " <BR>objConn.Open<BR>objRs.ActiveConnection = objConn<BR>objRs.CursorType = adOpenKeySet<BR>objRs.Locktype = adLockPessimistic<BR>objRs.Open "select * from mytable where myid=100"<BR>objRs.MoveFirst<BR>%&#062;<BR>

  2. #2
    peterjl@austec.net.au Guest

    Default Well If that don't do nothin' will

    It looks good to me.<BR><BR>What do you mean "This code don&#039;t work :"? Does it cuase an error or just not do what you intend?<BR><BR>By the way we do not seem to be seeing the actual part that is supposed to do the update!<BR><BR>Is this as far as it gets?<BR><BR><BR>

Posting Permissions

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