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"%>
Record Count
<%
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
%>
---
[ 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