Passing Parameters to Access Query

  • Thread starter Thread starter Jupiter
  • Start date Start date
J

Jupiter

Help!!!!!!!

Does anyone know where I can find documentation on how to pass parameters to an
access query from a Web page using VB.net code?
Any Examples, etc would help!


Thanks in Advance

Lea
 
Hi Jupiter,

Something like this?

OleDbCommand myCommand = new OleDbCommand
("YourQuery",myConnection);

myCommand.CommandType=CommandType.StoredProcedure;

OleDbParameter parameterTask=new OleDbParameter
("ParamName",OleDbType.VarChar,15);
parameterTask.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterTask);

Beware that (for Access) it is better to recreate the command if you want to
invoke it with different parameter values.
 
Back
Top