I really don't know. Will it work the way I think it will? :-)

On 3/3/07, Dan Kennedy <[EMAIL PROTECTED]> wrote:
On Sat, 2007-03-03 at 19:18 -0500, Mitchell Vincent wrote:
> I found the nifty ODBC driver for SQLite and have been trying to use
> it to replace a 2.8 SQlite implementation in some desktop software.
> It's working very well except for a rather large problem of not being
> able to call the last_id API functions. I need to get the primary keys
> assigned to parent tables in order to preserve referential integrity.
>
> SELECT MAX(id) FROM TABLE is one option but it's pretty dangerous
> seeing as multipl people *could* be accessing this database file at
> the same time..

What if you wrap the INSERT and "SELECT MAX(id)" statements together
in a transaction?

>
> Are there alternatives?
>
> Thanks!
>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




--
- Mitchell Vincent
- K Software - Innovative Software Solutions
- Visit our website and check out our great software!
- http://www.ksoftware.net

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to