snowboardr
Programmer
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'RecordCount'
Object doesn't support this property or method: 'RecordCount'
Code:
<%
Dim ConnString, strSQL
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db6236dcsf2de.mdb")
' ADO connection class
set my_conn= Server.CreateObject("ADODB.Connection")
' rs recordset will contain all fields in db such as userID, name, email
set rs = Server.CreateObject("ADODB.RecordSet")
' Connect ADO & open database
my_conn.Open ConnString
strSQL = "SELECT COUNT(*) FROM UserEmails"
' Execute SQL statement
rs = my_conn.Execute(strSQL)
' Write out the number of records
Response.Write "There are <b>" & rs.RecordsCount & "</b> records."
my_conn.close ' Close database connection
set my_conn = nothing 'obj variable released
%>