End Google Ads 201810 - BS.net 01 --> Hi,

How to pass parameters to a Access database using oledb provider and enterprise library. We used below code to update category table which has two colums ID and CategoryName. Even there is no error occured while executing the code.


Database db = DatabaseFactory.CreateDatabase("MyDemoConnection");
DbCommand dbCommand = db.GetSqlStringCommand("Update Category SET CategoryName = @CategoryName WHERE ID = @ID");
db.AddInParameter(dbCommand, "@ID", DbType.Int32,(int) 1);
db.AddInParameter(dbCommand, "@CategoryName", DbType.String, "Just a Change");

// Execute command
int i = db.ExecuteNonQuery(dbCommand);







It would be great if any one can redirect me to the exact way