Announcement

Collapse
No announcement yet.

Plugin SQLite3: SQLite3.GetLastInsertRowID broken?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plugin SQLite3: SQLite3.GetLastInsertRowID broken?

    Hi! I downloaded the SQLite3 Plugin from mindquake.com.br (great plugin!) and when I try to use "GetLastInsertRowID" I always get a "nil value" error. Is this action broken?

    (when I click on the Help link in the wizard popup in the code editor the help link for this action is broken and opens multiple tabs for each folder)

    I tried to call it directly after inserting values and a few lines below after the error check but its always a nil value. But why? The data was inserted.
    Its a nil value when I try it when the db is still open and when I close the dp and reopen it for this command.

    Code:
    OpenDB();
    SQLite3.Query(db, "insert into Anzeigen values(NULL,"..nKategorie..",'"..strTitel.."','"..strName.."','"..strTelefon.."','"..strBeschreibung.."','"..strBildname.."','"..strPreis.."',"..nPreisArt..",'"..strDate.."',0,NULL,14,'"..strPasswort.."')");
    
    nRowID = SQLite3.GetLastInsertRowID(db);
    
    nLastError = Application.GetLastError();
    if nLastError ~= 0 then
    strErrMsg = SQLite3.GetLastErrorString();
    Dialog.Message("Notice", "Error: " .. SQLite3.GetErrorString(nLastError).."\n\n"..strErrMsg, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end
    -- Anzeigen ID vom letzten Eintrag auslesen und mit Passwort anzeigen (für Nachrichtensystem)
    CloseDB();
    Bl4ckSh33p-Soft - Custom Software and Indie Games

  • #2
    Sorry for that, there is a typo in the XML. The action should be called as SQLite3.GetLastInsertedRowID() in the Lua script.

    I'll attempt to publish a revised version of the plugin later today.

    Ulrich

    Comment

    Working...
    X