Question regarding LockType

Results 1 to 3 of 3

Thread: Question regarding LockType

  1. #1
    Mark Guest

    Default Question regarding LockType

    I&#039ve built an entire application by creating my record set objects implicitly, like this:<BR><BR>Set MyConn = Server.CreateObject("ADODB.Connection") <BR>MyConn.Open "DBQ=" & Server.Mappath("internal.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" <BR><BR>myvar = "Insert Into Instructorpool(employeeID, courseId, tagteam, statusID) " <BR>myvar = myvar & "Values ("&request.form("employeeID")&",&#039"&request.for m("courseID")&"&#039,&#039"&tagteam&"&#039, &#039"&request.form("statusID")&"&#039)"<BR><BR>se t myvar = myconn.execute(myvar) <BR><BR>as opposed to the explicit way of creating an recordset: <BR><BR> Set rst = Server.CreateObject("ADODB.recordset") <BR> "JobsAvail", "Jobs", adOpenStatic, adLockOptimistic, adCmdTable <BR> rst.AddNew <BR><BR> rst("Available") = VarAvail <BR> rst("JobTitle") = VarJobTitle <BR><BR> rst.Update <BR> rst.Close <BR><BR>As many as 50 people could be updating and inserting at any given time with this application over our intranet. My question is- is there a default locktype when you implicitly create recordsets or will I have to rewrite some of my code to explicitly create locking types. Im concerned my database will come crashing down(actually, my boss is). Am I safe with the way I created my recordsets, and if I am, why? Thanks for the help<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Question regarding LockType

    To be honest i think you have done the BETTER way though i could be wrong. Why would you need a recordset for an insert query anyway i guess only if you want to do a rs.update. <BR><BR>As far as i can tell you have the more efficient way and I for one would stick to it and not go in for the ecplicit way

  3. #3
    mark Guest

    Default RE: Question regarding LockType

    thanks...thats relieving to know.

Posting Permissions

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