-
1
- #1
Hey guys, this is my very first post. Im hoping some could give me some insight. My boss want me to make a multi user access db that will be on a shared drive. I know ill use the database as the back end and everyone else will have front end db's. But Im worried with concurrency. So my thought was to use ado to do everything. So i started to experiment first. Everything was going good untill I started to mess with updating. What I want to di is that when a user is on a certain form it locks the record. The code I wrote is:
dim cn as new adodb.connection
dim cnn as new adodb.recordset
cn.open currentproject.connection
cn.cursorlocation=aduseclient
cnn.cursorlocation=aduseclient
cnn.open table,cn,adopendynamic,adlockpessimitic,adcmdtext
set me.recordset=cnn
me.txtid.controlsource=cnn.fields.item(0).name
me.txtname.controlsource=cnn.fields.item(1).name
me.txtbday.controlsource=cnn.fields.item(2).name
Then I minimize the form and open the table to see if the record is lock and i dont see the locking symbol. Am I really locking the record when I open the form or not. Im not sure and I cannot commit to this idea until I am. Can someone tell me if Im doing something wrong or what else do I need to do to lock a record if the your is in an edit form.
Thank
dim cn as new adodb.connection
dim cnn as new adodb.recordset
cn.open currentproject.connection
cn.cursorlocation=aduseclient
cnn.cursorlocation=aduseclient
cnn.open table,cn,adopendynamic,adlockpessimitic,adcmdtext
set me.recordset=cnn
me.txtid.controlsource=cnn.fields.item(0).name
me.txtname.controlsource=cnn.fields.item(1).name
me.txtbday.controlsource=cnn.fields.item(2).name
Then I minimize the form and open the table to see if the record is lock and i dont see the locking symbol. Am I really locking the record when I open the form or not. Im not sure and I cannot commit to this idea until I am. Can someone tell me if Im doing something wrong or what else do I need to do to lock a record if the your is in an edit form.
Thank