Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problem with last_insert_row_id in sqlite3

Reply
Thread Tools

Problem with last_insert_row_id in sqlite3

 
 
Kenneth McDonald
Guest
Posts: n/a
 
      10-20-2008
When I try to use the last_insert_row_id function in sqlite3, I'm
getting a sqlite syntax error. Since all I'm doing is:

db = SQLite3:atabase.new(...)
id = db.last_insert_rowid

I can't see what could possibly be wrong with something so simple as
this. Clearly, however, I'm also simple when it comes to this , so
any help would be appreciated.

Thanks,
Ken

 
Reply With Quote
 
 
 
 
Kenneth McDonald
Guest
Posts: n/a
 
      10-20-2008
Problem solved. The error was in incorrect docs on the web. the proper
function is last_insert_row_id.

Ken
On Oct 20, 2008, at 1:03 PM, Kenneth McDonald wrote:

> When I try to use the last_insert_row_id function in sqlite3, I'm
> getting a sqlite syntax error. Since all I'm doing is:
>
> db = SQLite3:atabase.new(...)
> id = db.last_insert_rowid
>
> I can't see what could possibly be wrong with something so simple as
> this. Clearly, however, I'm also simple when it comes to this ,
> so any help would be appreciated.
>
> Thanks,
> Ken
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange MySQL / sqlite3 Problem with unicode Hans Müller Python 1 12-04-2009 06:18 AM
Windows XP problem with Ruby, gem sqlite3-ruby, and SQLite3 SunSw0rd Ruby 4 07-02-2009 02:08 PM
Problem with sqlite3 cursor and imbricated for loop Charles V. Python 0 11-11-2008 11:44 PM
Pyro and sqlite3 problem Sébastien Ramage Python 4 12-02-2007 09:49 PM
"require 'sqlite3'" gives "no such file to load -- sqlite3 (LoadError)" Jeffrey 'jf' Lim Ruby 5 04-09-2007 10:58 AM



Advertisments