|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
locking an insert into database.
<i><b>Originally posted by : Paul</b></i><br />How do you lock an insert into a database if your using the command object to do the insert? I have the following code.<br /><br />Set cn = Server.CreateObject("ADODB.Connection")<br />cn.Open "DSN=Test" <br />Set cm= Server.CreateObject("ADODB.Command")<br /><br />cm.commandtext = "INSERT INTO tblTEST VALUES(?,?)"<br /><br />Set cm.ActiveConnection = cn<br />cm.parameters.append cm.createparameter("Test",200,,50,Test)<br />cm.parameters.append cm.createparameter("Test2",200,,100,Test2)<br />cm.Execute<br /><br />Any help would be appreciated<br /><br />Thanks<br /><br />Paul<br /><br /><br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : steve</b></i><br />Using transactions or how you open connection to the database. I'm not real familiar with the command object yet but i'd look for a property of the command object that allows for locks.<br /><br /><br />------------<br />Paul at 9/29/2000 6:41:59 AM<br /><br />How do you lock an insert into a database if your using the command object to do the insert? I have the following code.<br /><br />Set cn = Server.CreateObject("ADODB.Connection")<br />cn.Open "DSN=Test" <br />Set cm= Server.CreateObject("ADODB.Command")<br /><br />cm.commandtext = "INSERT INTO tblTEST VALUES(?,?)"<br /><br />Set cm.ActiveConnection = cn<br />cm.parameters.append cm.createparameter("Test",200,,50,Test)<br />cm.parameters.append cm.createparameter("Test2",200,,100,Test2)<br />cm.Execute<br /><br />Any help would be appreciated<br /><br />Thanks<br /><br />Paul<br /><br /><br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > locking an insert into database. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|