Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Recordset total showing -1

Explorer ,
Aug 11, 2006 Aug 11, 2006

Copy link to clipboard

Copied

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
TOPICS
Server side applications

Views

299
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 12, 2006 Aug 12, 2006

Copy link to clipboard

Copied

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





Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2006 Aug 12, 2006

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 12, 2006 Aug 12, 2006

Copy link to clipboard

Copied

Thanks guys got it going,

Im finding a few differences in the new version, but im getting there...
Thank You

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 12, 2006 Aug 12, 2006

Copy link to clipboard

Copied

LATEST
Have a look at the code I posted in the thread above. That could work.

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




Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines