Need snippet to insert into access database and return
the NEW identity value for insert in index table.
I have the following, but it doesnt work.
++++++++++++++++++++++++++++++++++++++++++++++
Dim connstring as String
connString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE="&Server.MapPath("\db\Database.mdb;")
Dim objConnection as OleDbConnection
objConnection = New OleDbConnection(connString)
objConnection.Open()
'Specify our SQL statement
Dim strSQL as String = "Insert into QA (Question,
Answer) Values(a, b)"
'Create the command object
Dim objCommand as OleDbCommand
objCommand = New OleDbCommand(strSQL,
objConnection)
objCommand.ExecuteNonQuery(strSQL)
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/