>>>How to do it? What I want to do is select a record, try to get a rlock on it, if successful insert that value into another table, then modify the record's "available" field so it won't be used again... I just need to figure out (with your help <grin>) how to send a rlock to vfpodbc.
>>>
>>>I have a table of "available index numbers" with 3 fields - indexnum (c), available (l), datetimeused(d). I also have a table for guestbook entries - indexnum (c), name (c), address (c), etc.
>>>
>>>I just want to "remove" a record from the available index number table and use it (only once) in the guestbook table.
>>>
>>
>>I haven't tried this, but I'd guess you'd need to write a stored procedure and trigger it as a row or field validation rule. I'm not sure what locking and buffering options are avaialble under the VFPODBC driver; you'll need to consult the docs that accompany the VFPODBC driver (VFPODBC.TXT and DRVVFP.HLP; the latter contains the list of supported and unsupported VFP commands under the ODBC driver.) FLOCK(), RLOCK(), the TRANSACTION syntax, TABLEUPDATE() and TABLEREVERT() are supposedly supported.
>
>
>Stored procedures aren't supported by VFPODBC, going by the drvvfp.hlp file, but rlock() is.... I wonder if I could do some kind of sql update with an rlock or something....
Not true - you can't create them, but if they're already in the DBC and fired by a rule or trigger (like RI code or field validation rule already stored and compiled in the DBC) that doesn't use a restricted VFP command, it will work, at leastn to drop in a default value on an append.