Below is an ASP file that counts the number of records in an Access Database
labeled XXXX.mdb. This bypasses the need to add a DSN on the server to
access a DB file
. Again this is an Access example.
Gilbert T. Gutierrez, Jr.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Record Count</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("XXXX.mdb"))
conn.CursorLocation = 3
set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM admin"
rs.Open sql,conn
i=rs.RecordCount
response.write("The number of records is: " & i)
rs.Close
conn.Close
%>
</body>
</html>
---
[ This E-mail was scanned for viruses by Phoenix Internet ]
[ Phoenix Internet
http://www.phoenixinternet.net ]
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss