Code Help

 
Post new topic   Reply to topic    Aprelium Forum Index -> Classic ASP
View previous topic :: View next topic  
Author Message
jasjmorris
-


Joined: 28 Jan 2004
Posts: 7
Location: Jacksonvile, Florida

PostPosted: Mon Jun 25, 2007 12:27 am    Post subject: Code Help Reply with quote

I am running a big script and I am having to fix little errors in it to make it work. I have fixed all but one. Would appreciate any help with this

Code:

    Private Function getTotalFolderCount()
        set rs = server.createobject("adodb.recordset")

       If objDbConn.state <> 1 Then

         objDbConn.open strDbConnection

       End If

       strSQL = "SELECT count(FolderId) as cnt FROM Folders;"
       rs.open strSQL , objDbConn, 2, 2

      ' Do not count the root music folder itself
      thecnt = rs("cnt")
      if rs("cnt") > 0 Then
        thecnt = thecnt - 1
      End If

        getTotalFolderCount = thecnt

    End Function


it gives me an error and i have pin pointed it down to this part of it

Code:

      thecnt = rs("cnt")
      if rs("cnt") > 0 Then
        thecnt = thecnt - 1
      End If


Mainly when the program tries to do anything with rs("cnt") and math..
any fix ?[/code]
Back to top View user's profile Send private message Send e-mail AIM Address
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jun 27, 2007 10:55 pm    Post subject: Re: Code Help Reply with quote

jasjmorris,

What is the exact error message you are getting?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Classic ASP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group