Page 1 of 1

Access denied when using stored procs

Posted: Sat Apr 21, 2007 5:34 pm
by GeXus
There are actually to issues... one is syntax one is access... When I do the following

Code: Select all

CREATE PROCEDURE sp_get_category()
BEGIN
SELECT category_id FROM categories;
END;
I receive a syntax error for the 'select...' (note, im using query browser to excute this)..

Now when I do this..
CREATE PROCEDURE sp_get_category()
BEGIN

END;
I receive access is denied. If I do the select outside of a procedure, then it executes fine, and i'm connected to that DB, so not sure why I would get that.

any ideas?

Thanks!