Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to lock a record in a table using a query, VB6 and Oracle as a database

How to lock a record in a table using a query, VB6 and Oracle as a database

From: Gaz <gonkowonko_at_gmail.com>
Date: 2 Oct 2006 03:26:05 -0700
Message-ID: <1159784765.081935.283890@c28g2000cwb.googlegroups.com>


Hi,

Spent the last week searching for this solution here is my problem....

I basically want to to be able to search for a record and then view it but if i view it i want to lock it so no one else can edit it. This is becuase i have got a browse and edit mode in my software. The problem is it doesnt want to lock and i can update the record from the database.

Im using VB6 and adodb as a connection string ive tried opening the record for update but cant seem to get it too work and its doing my head in.

All i want is to be able to parse a SQL string through and then lock the tables/records it relates to is this possible??

Here is my code.....

set rst = new adodb.recordset
 rst.Source = "Select t1.col2, t2.col1 " & _

"From tableone t1,tabletwo t2 " & _
"Where (t1.id=t2.id) and (t1.id=" & strID
& ")"

                    .Open , gcnnLive, adOpenKeyset, adLockOptimistic

the query itself works and it populates my txtboxes but no data is bound, ive tried using the ado control for VB6 and that shows the data but doesnt lock it either im desperate can anyone help me or offer advise??

Cheers

gaz Received on Mon Oct 02 2006 - 05:26:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US