cursors and ASP page

Поиск
Список
Период
Сортировка
От ANJANE
Тема cursors and ASP page
Дата
Msg-id 6776250.post@talk.nabble.com
обсуждение исходный текст
Ответы Re: SPAM-LOW: cursors and ASP page  ("William Penberthy" <bpenberthy@scarpatechnology.com>)
Список pgsql-general
I have a postgresql function defined as follows ...

DECLARE int_userid ALIAS FOR $1;
BEGIN OPEN $2 FOR
SELECT DISTINCT
  "users"."userloginid",
  "roles"."rolelike"
FROM
  "roles"
  INNER JOIN "userpreferences" ON "roles"."roleid" =
"userpreferences"."roleid"
  INNER JOIN "users" ON "userpreferences"."userid" = "users"."userid"
WHERE
  "users"."userid" = int_userid AND "userpreferences"."userrolestatus"='a';
RETURN $2;
close $2;
END;

This function takes two parameters - cursor and a valid integer, returns a
cursor in parameter 1

In ASP page, I have the following code to reference this cursor and display
information obtained.

This code does not work ... I get page cannot be displayed error - HTTP 500
- Internal server error
Internet Explorer


what am I doing wrong? I am using 7.3.200 version of postgresql ODBC driver
on an IIS server


<html>
<body>


<%
Dim STRCONN
Dim sql
Dim rs

STRCONN = "Driver=PostgreSQL;Server=207.7.254.71;Port=5432;User
Id=postgres;Password=postgres;Database=transpandit;"
sql = "begin; select tp_get_userroles('rcursor', 5052); fetch all in
rcursor; commit;"
set rs = server.createobject("adodb.recordset")
rs.open sql, STRCONN

response.write(".." + sql + "<br>")

FETCH rcursor INTO userloginid, rolelike
reponse.write(userloginid + " - " + rolelike + "<br>")
WHILE FETCH_STATUS = 0
        FETCH rcursor INTO userloginid, rolelike
        reponse.write(userloginid + " - " + rolelike + "<br>")
WEND

CLOSE rcursor


//While Not rs.EOF
// response.write("<br>"&rs(0))
// response.write("<br>"&rs(1))
//
// rs.MoveNext
//Wend
//rs.Close

%>

</body>
</html>

--
View this message in context: http://www.nabble.com/cursors-and-ASP-page-tf2430350.html#a6776250
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: more anti-postgresql FUD
Следующее
От: "Rob Richardson"
Дата:
Сообщение: Can a function determine whether a primary key constraint exists on a table?