Home All Groups Group Topic Archive Search About

Access Stored Procedure Problem



Author
25 Feb 2005 5:04 PM
Savas Ates
my stored procedure in access XP (I create it Succesfully)
It returns me all records.. For example in my db there are records with
catid=1 but no record with id=2

I try my code both catid=1 and catid=2 it returns same records.. What is my
fault..?

CREATE PROCEDURE ST_GETSUBCAT
(
@CatID

Integer
)
AS

SELECT * FROM TBLCATSUB  WHERE catid=@CatID


Ssql="EXEC ST_GETSUBCAT 1"
set rs=baglantim.execute(Ssql)
do while not rs.eof
Response.Write rs("id") & "<br>"

rs.movenext
loop

Author
25 Feb 2005 5:57 PM
Andy Williams
Savas,

You might want to post this to an Access group.

The stored procedure looks fine, what happens if you run it from Query
Analyzer?  Could you post DDL and sample data for the table?

http://www.aspfaq.com/etiquette.asp?id=5006

-Andy

Show quote
"Savas Ates" <sa***@indexinteractive.com> wrote in message
news:eTLtFw1GFHA.2936@TK2MSFTNGP15.phx.gbl...
> my stored procedure in access XP (I create it Succesfully)
> It returns me all records.. For example in my db there are records with
> catid=1 but no record with id=2
>
> I try my code both catid=1 and catid=2 it returns same records.. What is
> my fault..?
>
> CREATE PROCEDURE ST_GETSUBCAT
> (
> @CatID
>
> Integer
> )
> AS
>
> SELECT * FROM TBLCATSUB  WHERE catid=@CatID
>
>
> Ssql="EXEC ST_GETSUBCAT 1"
> set rs=baglantim.execute(Ssql)
> do while not rs.eof
> Response.Write rs("id") & "<br>"
>
> rs.movenext
> loop
>
>

AddThis Social Bookmark Button