Brenda Pasquarello skrev:
If connecting to MS Access DB instead of SQL, can you call a query similar
to how you would call an SQL Stored Procedure?
Examples would be great!
Of course
1. Create a stored procedure in access (create a new question, use SQL
button and create you're question example 'SELECT * FROM MyTable' or if
you wan't to assign values 'SELECT * FROM MyTable WHERE ID=[@ID]')
2.Use the following code in you're *.cs or *.vb form
....
objCmd = new OleDbCommand ("Name of you're sp in access",objConn);
objCmd.CommandType = CommandType.StoredProcedure;
// OBSERV THAT THE ORDER BETWENN THE FORM AND SP MUST BE SAME
objCmd.Parameters.Add("@ID",((TextBox)e.Item.FindControl("txtAdress")).Text);
// OPEN THE DATABASE...
objConn.Open();
objCmd.ExecuteNonQuery();
objConn.Close();
God luck, Michael