Pass-through query

  • Thread starter Thread starter Majstor
  • Start date Start date
M

Majstor

Hello,

is it possible to assign parameters to "pass-through" query on SQL Server
(if not in design then in VB code)?

Regards,
Vladimir
 
Dear Vladimir:

There are a couple of possibilities.

You can have your VBA code write the SQL and run that string, rather
than having a saved View, Stored Procedure, or User Defined Function.

You can access a saved Stored Procedure or User Defined Function,
passing the parameters in its definition using the Command object's
parameters collection. You can even return parameter values this way.
You cannot do this with a View, as Views do not accept (or return)
parameters in any case.

Be sure to use ADODB.Command.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top