I'm trying to write a simple ASP script that will connect to a MySQL database, count the number of records, and then display that count on a page.
When I access the page containing the following script I recieve the error:
Any ideas on what is wrong and how I can rework this to display properly?
Code:
<%@Language="VBScript"%>
<%
dim Conn, myRS
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={MySQL ODBC 3.51 Driver};Server=server_name;Database=db_name;UID=user_name;PWD=password;OPTION=35;"
Conn.Open DSN
Set myRS = Conn.Execute("SELECT COUNT(objects.ObjectID) FROM objects")
%>
<html>
<body>
<% Response.write(myRS) %>
</body>
</html>
When I access the page containing the following script I recieve the error:
Response object error 'ASP 0185 : 8002000e'
Missing Default Property
/objcount.asp, line 0
A default property was not found for the object.
Any ideas on what is wrong and how I can rework this to display properly?