Skip to main content
Inspiring
August 12, 2006
Question

Recordset total showing -1

  • August 12, 2006
  • 2 replies
  • 349 views
Hi Guys,
I have a puzzle and im not seeing the problem..

Im in DW8 using VBS on ASP pages

Im pulling a recordset from a database with some sql to filter my records.
The recordset is getting pulled and the records are being displayed.

So I thought Id put a message on the page if there were no records so I tried to use

<%=(Recordset1_total)%> to get my record total value and if it was 0 or less than 0 ive put


<%
if ((Recordset1_total) <= 0) then
response.Write("No Photos Added As Yet Please Look Back Or Add A Photo Now!")
end if
%>


Now when I look at the value of Recordset1_total it shows as -1 all the time even when there are records in there??

Sorry its late and im just not seeing it?
Thanks again for any support
Regards
Tag
This topic has been closed for replies.

2 replies

Participating Frequently
August 12, 2006
I think this might be relevant. I've used this before for a record count:

First, the cursor must be set before opening record set:

rsRecordSetName.CursorType=1
rsRecordSetName.Open()
varCoRecCount = rsRecordSetName.recordcount

From some other posts, I understand DW8 may have a different code for opening record sets. The above came from something I dd in DW 2004 or MX. I haven't looked at the code from DW8.

It's the use of "rsRecordSetName.recordcount" that I'm pointing out.
Tag2007Author
Inspiring
August 13, 2006
Thanks guys got it going,

Im finding a few differences in the new version, but im getting there...
Thank You
Inspiring
August 12, 2006
What recordset code are you using? In theory you can alter the cursor
location to be on the client. I'm not so sure that this works with the new
DW recordsets in 8.0.2. In which case you'll need to hand code it.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004