jasjmorris -
Joined: 28 Jan 2004 Posts: 7 Location: Jacksonvile, Florida
|
Posted: Mon Jun 25, 2007 12:27 am Post subject: Code Help |
|
|
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] |
|