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 ?
|
|
|
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 |
|
|
|