I have a table in SQLite:
CREATE TABLE "EventType" ( [EventTypeID] INTEGER PRIMARY KEY, [EventTypeName] VARCHAR(50) NOT NULL UNIQUE );
Since EventTypeID is an integer and primary key, this automatically makes it an auto-increment column, and it works great.
I would like to insert a row into a table and get a new value with VB6.
Dim oRs as Recordset dim oCmd as new Command oCmd.ActiveConnection = GetConnection() oCmd.Source = "insert into EventType (EventTypeName) values ('blah')" oCmd.Execute
Is there an automatic way to get a newly created EventTypeID without having to issue another request (select max (EventTypeID) from EventType)?
It seems I remember from VB6 days a long time ago that there was a way to do this.
sqlite vb6 auto-increment
AngryHacker Feb 10 '09 at 5:03 2009-02-10 05:03
source share