Re: Need to display results of Stored Proceedure with Criteria
- From: "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
- Date: Tue, 17 Oct 2006 01:22:18 -0400
After taking a look at your first post, the most likely explanation is that
you have used [domainname\myname] instead of [dbo] as the owner of your
stored procedure. Instead, you should try something like this:
CREATE PROCEDURE dbo.StoredProcedure1(@Pick_Month nvarchar(50))
AS SELECT Employee, WorkDate, Customer, WorkHours
FROM dbo.tblWorkDetail
WHERE (DATEPART(Month, WorkDate) = @Pick_Month)
GO
After creating this stored procedure, don't forget to refresh the query list
of ADP by using the View|Refresh command when the query list is displayed or
by closing/reopening the ADP project.
Using anything else than dbo can be tricky with ADP; especially when this
will be another user than you who will use the SP that you will create under
your account.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"Groucho" <Groucho@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EEBB4242-66BA-4EB7-A482-B98389F2D0D6@xxxxxxxxxxxxxxxx
I want to just open it in data*** view. My boss wants the data, but
wants
to just pick what month to see. He will copy it to excell, but doesn't
want
to have it as an export.
Thanks in advance for any help that you can be.
"Sylvain Lafontaine" wrote:
Do you want to display a form or a report?
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"Groucho" <Groucho@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8679A632-3B94-4644-930C-90577FC45982@xxxxxxxxxxxxxxxx
I am open to using either a stored proceedure or an inline function to
be
able to do this. I have looked trough all 12 pages in this section and
it
starts to talk about what I need and then it goes off on a tangent to
where I
get lost.
My query that I need to run is much more involved, but the one below
will
still be able to show what I want to do and an answer on how it should
be
done would be easily moved to the more complex query.
SELECT Employee, WorkDate, Customer, WorkHours
FROM dbo.tblWorkDetail
WHERE (DATEPART(Month, WorkDate) = @Pick_Month)
I want to either have a field on a form that will set the criteria or
just
have an input box open that would ask for the month.
My problem lies in that I can create the function or SP but when other
users
try and use it, the systems says that the object cannot be found. I
gave
all
uses full permission on the SQL object so that isn't it, but when I
look
at
the SP in SQL it looks like this:
CREATE PROCEDURE [domainname\myname].StoredProcedure1(@Pick_Month
nvarchar(50))
AS SELECT Employee, WorkDate, Customer, WorkHours
FROM dbo.tblWorkDetail
WHERE (DATEPART(Month, WorkDate) = @Pick_Month)
GO
and I think it is because of the domainname\myname that I am having the
issue.
Is there a way to open this like a query window that all can use?
I have tried with connection objects, I have tried making tables that
do
not
show up until you refresh the table list for some reason, etc. I am at
wits
end for something that was so simple with an mdb.....
.
- Follow-Ups:
- References:
- Re: Need to display results of Stored Proceedure with Criteria
- From: Sylvain Lafontaine
- Re: Need to display results of Stored Proceedure with Criteria
- From: Groucho
- Re: Need to display results of Stored Proceedure with Criteria
- Prev by Date: Re: Need to display results of Stored Proceedure with Criteria
- Next by Date: Re: Setting control value based on a SQL Select statement
- Previous by thread: Re: Need to display results of Stored Proceedure with Criteria
- Next by thread: Re: Need to display results of Stored Proceedure with Criteria
- Index(es):