I want to use the Microsoft Enterprise application suite for MS Access database (OLEDB provider)
I want to use the parameter-based INSERT functionality with the corporate library (just like we do for the SQL provider with parameter-based code - database.params.Add ("@EmpName", this.EmpName);
I want the same for connecting to an MS Access database.
Can someone please let me know How can I do this?
Thanks in advance.
Will this code work?
SirDemon, Thanks for the explanation. I know everything related to INSERT, Update, and Delete for SQL. I want it compatible with MS ACCESS. Ok, tell me, will the code below work?
string query = "INSERT INTO DB (EmployeeID, Name) VALUES (@EmployeeID, @Name)
Database db = DatabaseFactory.CreateDatabase();
DbCommand sqlCommand = db.GetCommandFromText(query);
db.AddInParameter(sqlCommand, "@EmployeeID", this.EmployeeID);
db.AddInParameter(sqlCommand, "@Name", this.Name);
Will this example work in an MS Access database.