A n00b in need of help. ;P

Results 1 to 2 of 2

Thread: A n00b in need of help. ;P

  1. #1
    David Tremayne Guest

    Default A n00b in need of help. ;P

    Well again I am having problems, I have absolutely no clue what db locks are, and what they do. All I am trying to accomplish is to beable to write to a simple access2000 db useing Con.Execute, I did get a little help, But evidently did "jack".<BR>Can someone tell me<BR>#1 What a CursorType is, What Types are there, and what does it do to help we with my "Journey"<BR>#2 Same with LockType.<BR><BR>These 2 have gave me nuff trouble, so I figure if I know them all atleast I learn somthing here and I know what to do if I do come back into this prob.<BR><BR>~Dave<BR>~16YrOldN00bFrOmCaNaDa

  2. #2
    Join Date
    Dec 1969

    Default I think I'd stick with newbie...

    n00b looks to much like b00b.<BR><BR>Anyway...<BR><BR>It&#039;s probably easier to understand what the selection of a given cursor type *does* for you than to explain what one is. Specifically, some of the things you&#039;d like to do with a RecordSet can *only* be done with *some* of the cursor types. See here for a wonderful quickie summary:<BR><BR>http://www.learnasp.com/learn/adocursortypes.asp<BR><BR>You can also look in the ASPFAQs for the FAQ about how to use .AddNew to get the ID of a just added record. You&#039;ll discover there that only adOpenKeyset can be used if you want to take advantage of that capability.<BR><BR>As for lock types...<BR><BR>adLockReadOnly is, I hope, self explanatory. Open a recordset that way, and you can&#039;t modify any records or add any via that object.<BR><BR>optimistic/pessimistic locks: Most of the time, you don&#039;t care which you use. An optimistic lock means you think that the change you will (presumably?) make will not disturb any other queries taking place at the same time in other threads. This is typically true, of course, if you are adding a record. Nobody else can see it, yet, anyway. A pessimistic lock means you want to lock the record when you read it and not unlock until the operation is complete. This is a good thing to use when you have many users who *might* be modifying the same record. (It&#039;s also probably the source of the "deadlock" messages you sometimes get in this forum.)<BR><BR>And I left one out but for the life of me I don&#039;t remember what it is. Probably because I&#039;ve never used it.<BR><BR>Anyway, believe it or not this is all in the MS docs. You just have to dig through layers to find it all.<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