Re: no tuples found at index...
From: steve (a_at_b.com)
Date: 01/02/05
- Next message: Anne: "PHP Chat"
- Previous message: Luigi Donatello Asero: "Re: SSL questions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 1 Jan 2005 21:08:50 -0600
well, steve, it's to do with the return statement(s)...just start the query
with "set nocount on"...all will be well at that point.
"steve" <a@b.com> wrote in message news:ycWAd.7234$qI6.1227@fe03.lga...
|i have a query hitting ms sql server. it runs fine in the query analyser
but
| gives an error (no tuples found at... which means the resultset returned
no
| records from what i've read). i have a good connection that i execute the
| sql on.
|
| i'm using odbc to query the db and have tried all of the odbc_cur_use_*
| cursor types on the odbc_connect() but none solve the problem.
|
| any help is appreciated! here's the sql...it's supposed to return a
| unix-type permission string "rwx-rwx----" for each page that is accessed
and
| is used in conjunction with user account information:
|
| ===================
|
| DECLARE @requiresPermission INT
| SET @requiresPermission =
| (
| SELECT COUNT(*)
| FROM webPages
| WHERE Url = 'index.php'
| AND Restricted = 0
| )
| IF @requiresPermission = 0 BEGIN
| SELECT 'r' Access
| RETURN
| END
| SET @requiresPermission =
| (
| SELECT COUNT(*)
| FROM accessList a,
| webPages w
| WHERE w.Id = a.Url
| AND w.Url = 'index.php'
| AND a.person = 0
| )
| IF @requiresPermission = 0 BEGIN
| SELECT '' Access
| RETURN
| END
| SELECT a.Access
| FROM accessList a,
| webPages w
| WHERE w.Id = a.Url
| AND w.Url = 'index.php'
| AND a.person = 0
|
| ===================
|
|
- Next message: Anne: "PHP Chat"
- Previous message: Luigi Donatello Asero: "Re: SSL questions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|