Here is question 1 answer, there is other ways though... and question 2 is below, although Im not sure if that is correct, but I think it is.
<%
Dim ConnString, strSQL
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("database.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 table_name"
' Execute SQL statement
rs.open strSQL, my_conn
' Write out the number of records
Response.Write "There are <b>" & rs.Fields(0) & "</b> records in the database."
rs.close ' Close database connection
set rs = nothing 'obj variable released
%>
2
change your sql statement to:
strSQL = "SELECT COUNT(*) FROM table_name WHERE table_name NOT NULL"
www.vzio.com
/
![[wink] [wink] [wink]](/data/assets/smilies/wink.gif)