Re: External Data from Stored Procedure with parameters




Ben Rum wrote:
> when the user selects "Refresh Data!" I
> would like the user to be prompted to enter the values as per the
stored
> procedure parameters..
>
> e.g. exec sp_MySpName @StartDate = [prompt user], @EndDate = [prompt
user]
>
> Is this possible?

It is not possible to get MSQuery to automatically prompt for the
parameters.

To be able to use MSQuery parameters, the SQL must be a simple SELECT
written in MSQuery's own SQL dialect, rather than that odbc syntax or
the dialect of the database server. Using odbc's CALL syntax, ANSI's
EXECUTE syntax or anything proprietary will result in the 'cannot
display graphically' (whatever that means) message, after which
built-in support for parameters is lost.

You can, of course, write VBA to dynamically change the querytable's
SQL
text, then everything will be up for grabs, including throwing up
userforms with calendar controls on them, but you will have to write it
yourself <g>.

Jamie.

--

.



Relevant Pages

  • Re: SQL stored procedure with paramters from MS Query
    ... > a worksheet cell using MS Query? ... To be able to use MSQuery parameters, the SQL to be a simple SELECT ... written in MSQuery's own SQL dialect, rather than that odbc syntax or ... Using ocdb's CALL syntax, ANSI's ...
    (microsoft.public.excel)
  • Re: SQL stored procedure with paramters from MS Query
    ... It's good to know VBA can modify the querytable's SQL although I was tring ... > written in MSQuery's own SQL dialect, rather than that odbc syntax or ... Using ocdb's CALL syntax, ANSI's ...
    (microsoft.public.excel)
  • Re: Connection.Execute causes untrappable runtime error
    ... Set Recordset = Database.Execute ... If I want to do a delete or Update, I do a Database.Execute ("SQL Syntax") ... I believe that the dataenvironment is the best thing in vb6 (The program are ...
    (microsoft.public.vb.database.ado)
  • Re: Linq to Python
    ... paradigm's big idea is to use a python + SQL type syntax to access data ... Simple LINQ expressions like the one you gave map easily to Python list ... I'm not overly keen on SQL syntax: I think this sort of complex expression ...
    (comp.lang.python)
  • Re: To LinQ or not LinQ
    ... i.e. "the SQL-like" syntax. ... You say SQL is set oriented and Linq is sequence oriented. ... that the languages differ in meaning even when they superficially look ... relational models are tightly coupled with SQL or that SQL is the ...
    (microsoft.public.dotnet.languages.csharp)