Re: External Data from Stored Procedure with parameters

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




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: XML vs SQL Server
    ... The built in factory assumes a common syntax among the ... the DBProvider Factory pattern is an interface-based ... Even if your SQL needs to be changed, ... change the value of the CommandText and everything else is fine. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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: SQL Generator library
    ... I'm not sure what you mean by an object graph. ... syntax to three statements that seem to have ... SchemeQL[2] for Scheme that have similar goals. ... I think that the SQL it uses should be fairly portable, ...
    (comp.lang.ruby)