Posted on: 4/10/2015 12:20:01 PM | Views : 605

I am using web forms and access. I am trying to use identity to pull the last inserted id and place it as a foreign key into another table unsuccessfully. (I am a newby at this).
Please can anyone tell me where I am going wrong and how to fix my code? Thank you in advance
Error:
Error: System.IndexOutOfRangeException: An OleDbParameter with ParameterName '@user_id' is not contained by this OleDbParameterCollection. at System.Data.OleDb.OleDbParameterCollection.GetParameter(String parameterName) at System.Data.OleDb.OleDbParameterCollection.get_Item(String parameterName) at Registration.Button1_Click(Object sender, EventArgs e) in c:\Users\lou\Documents\Visual Studio 2013\WebSites\BeautyExperts\Registration.aspx.cs:line 65
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Confi ...

Go to the complete details ...