User input for variables in SP

User input for variables in SP

Post by Thomas R. Humme » Sat, 19 Aug 2000 04:00:00

SQL Server is not a front-end development tool. As such, you cannot
prompt users for information - nor should you want to. You don't want
to start a transaction to the database and then have that transaction
open indefinitely while you wait for the user to respond to a prompt.

You can have parameters in a stored procedure, but the way to do it is
to have you front-end program prompt the user for values and then call
the stored procedure using those values. What you seem to be talking
about with Excel is like that.

I'm not familiar with MS Query though, so I'm afraid that I can't help
you there.


Quote:> How can I get SQL server to ask the user to input the values it needs
to run
> a stored procedure ?

> I would need the user to input like the year and month, where the SP
> return lets say total sales for that month.

> I just can't get it done...

> Another way I'd like to be able to do this is to have the user alter
> values in one or two cells in an Excel spreadsheet and push the
button with
> the red exclamation mark, after which MS Query would refresh the data
> the values in the cells as parameters. I just can't get MS Query to
> parameters.

> Any help would be greatly appreciated. It's driving me nuts.


> Jurriaan

Sent via
Before you buy.