SQLite Insert return ID...
I'm not sure if this is the right place to place this question..... I am using SQLite and what I am doing is passing a simple SQL statement to the database, however I want to also return the Unique ID that the insert statement has been entered to, however I am not sure how to do this within a single SQL statment.
My code is below:
Code:
Dim mySQL As String = "INSERT INTO DisplaySetFolderTbl (parentID, folderName) VALUES ('" & selNode.Tag & "','" & Trim(Me.txtName.Text) & "')"
Dim cmd As New SQLiteCommand(mySQL, MISData.Instance.dbDRV)
Try
cmd.ExecuteNonQuery()
Catch
Exit Sub
End Try
MISData.Instance.dbDRV is the connection string
Thanks
Simon
Re: SQLite Insert return ID...
Does SQLLite allow more then one statement on a command? If so you probably seperate the commands with a semi-colon ( ; ).