Hi,
There are the ugly ways and the dirty ways.
To create a Parameter query, the ugly way it through the connection object
CreateCommand() method, then
command.CommandType = CommandType.Text;
command.CommandText = "... sql statement here..., with a parameter..."
The dirty way is to define a store procedure with an Execute of an SQL
string: "CREATE PROC procName( argName INTEGER) AS ... "
To use it, the ugly way is through the creation of a parameter object,
through CreateParameter() of the command object, and then
param.ParameterName= "name of the parameter";
param.SqlDbType= SqlDbType.whatever;
param.Value= someValue;
The dirty way is to execute, again, an SQL string: "EXEC PROC procName
listOfParam"
( I won't elaborate on how to process the results, that is generally covered
in C# books/texts about databases).
You can check (query) the MSysObjects system table to know if a query
exists, or not.
I have not tried it, but it sounds that the command object CommandText
should be the place where you can read the "text" of the procedure.
You may get much greater details in a C#/ ADO.Net group of discussion. This
ng is dedicated about using Access, the application, or Jet, the database
engine, from within Access.
Hoping it may help,
Vanderghast, Access MVP