Retrieve the key index

Results 1 to 2 of 2

Thread: Retrieve the key index

  1. #1
    Join Date
    Dec 1969

    Default Retrieve the key index

    Here is my code:<BR> connStrStats = ConfigurationSettings.AppSettings("connStrStats")< BR> conStats = New OleDbConnection(connStrStats)<BR> <BR> strSessionID = Request.Cookies("ASP.NET_SessionID").Value<BR> <BR> strInsert = "INSERT INTO stats (SessionId) Values (&#039;" & strSessionID & "&#039;)"<BR> cmdInsert = New OleDbCommand(strInsert,conStats)<BR> conStats.Open()<BR> cmdInsert.ExecuteNonQuery()<BR> conStats.Close()<BR><BR>This code works fine, but how do i get the autonumbered ID field assosiated with the data i just inserted?

  2. #2
    Join Date
    Dec 1969

    Default RE: Retrieve the key index

    See if this helps out<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts