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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top