I tried to put con.BeginTrans and it seems working. Is that all I
need??
objConn.BeginTrans
objRS.Open "SELECT * FROM EMP UPDATE OF EMPNO", objConn,
adOpenForwardOnly, adLockBatchOptimistic
con.CommitTrans
SEOSpecialist wrote:
> I am wondering the same thing.....
>
> It sounds to me like you may be wanting to carry out a secure
> transaction... in which case, ASP has the tools to do it.
>
> You'll need to use the proper transaction properties of the database
> objects....
> E.g....
> ....
>
> <%
> Set con = Server.CreateObject("ADODB.Connection")
>
> con.Open connectionString 'open connection
> con.BeginTrans 'Begin the transaction
>
> con.Execute("insert into YourTablename values ('testFieldData')")
> 'insert a record
>
> if YourTestCondition = True then
> con.CommitTrans
> else
> con.RollBackTrans
> end if
>
> Set Con = Nothing
> %>
>
> Hope this helps,
>
> Rob
> http://www.webforumz.com/asp-forum/ - ASP Forum