On Sat, Jul 30, 2011 at 4:29 PM, Mike Copeland <[email protected]> wrote:

>    Here's a curious problem with VFP9 using MySQL 5.1 as a back end...
>
>
>
>    Randomly, I get an error when trying to access tables in a MySQL
>    database. The error is
>
>        "Table 'X' was not locked with LOCK TABLES"  (where X is one of
>    several different tables)
>
>
>       lock tables systemtable write
>
>       select docid from systemtable
>
>       update systemtable set docid=docid+1
>
>       unlock tables
>
-------------

You are treating mySQL like VFP.  Sorry but it doesn't work that way.

Can you set mySQL tables to generate their own ID and your insert
achieve that "new" id?

I know that you can write a stored procedure to do this in one
statement instead of multiple VFP messages.

Can you give us ALL the code to run the above lines?  Are you doing a
connection one time and then submitting all of these statements one at
a time?

-- 
Stephen Russell

Unified Health Services
60 Germantown Court
Suite 220
Cordova, TN 38018

Telephone: 888.510.2667

901.246-0159 cell

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMYLEEWeQOkxr_tyBv=b=r+zfokyb2kx2ao-yqpaeos+...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to