Dim strSQL Sv: SQL COUNT med Access
Dim conn
Dim rsTemp
strSQL = "SELECT Count(*) As Antal FROM >>>TableName...<<<"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open ">>>Conectionstring...<<<"
Set rsTemp = conn.Execute(strSQL)
If rsTemp.eof Then
Response.Write "Antal poster: 0"
Else
If Isnull(rsTemp("Antal")) Then
Response.Write "Antal poster: 0"
Else
Response.Write "Antal poster: " & rsTemp("Antal")
End if
End if
rsTemp.Close
Set rsTemp = Nothing
conn.Close
Set conn = Nothing