CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Object doesn't support this property or method: 'RS.EOF'

Print topic Send  topic

Author Message
Bret

Posts: 13
Posted: 03/20/2009, 8:27 AM

I am having issues when a SELECT returns no records ..

Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'RS.EOF'

Here is the code ..

Quote :
' 1) See if the email address exists for this member
Sql = ""
Sql = Sql & "Select * From AddressBook Where Memberid=" & cMemberId & " AND Email='" & cEmail & "'"

Set Connection = New clsDBConnection1
Connection.Open
rs = Connection.Execute(SQL)
IF rs.EOF Then <-- ERROR IS ON THIS LINE
' 2) If Not - Add the contact information (FirstName LastName)
Sql = ""
Sql = Sql & "Insert INTO Addressbook ("
Sql = Sql & "MemberId, FirstName, LastName, Email) VALUES ("
Sql = Sql & cMemberId & "," & CCToSQL(cFirst,"String") & "," & CCToSQL(cLast,"String") & "," & CCToSQL(cEmail,"String") & " )"
rs = Connection.Execute(SQL)
End If
rs = NULL
Connection.Close
Set Connection = Nothing

How can I test to see if a Recordset was returned ?
View profile  Send private message
Oper


Posts: 1195
Posted: 03/21/2009, 7:37 AM

SET rs = Connection.Execute(SQL)
IF rs.EOF Then <-- ERROR IS ON THIS LINE


you missing the SET
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.