Hvorfor skriver den -1 istedet for at skrive
det antal fil, der er i kategorien? (
http://www.katzmann.dk)
Jeg ved godt jeg famler mig frem, men.... please
Koden er her:
strConnect = "Data
Source=d:\home\katzmanndk\db\movies.mdb;Provider=Microsoft.Jet.OLEDB.4.0;"
Dim Conn, rs
Set Conn = Server.CreateObject ("ADODB.Connection")
Set rs = Server.CreateObject ("ADODB.Recordset")
Set rs2 = Server.CreateObject ("ADODB.Recordset")
if request.querystring("Type") <> "" then
sqlStr = "SELECT * FROM MovieList WHERE Type='" &
request.querystring("Type") & "' ORDER BY ID DESC"
sqlStr2 = "SELECT COUNT(ID) FROM MovieList WHERE Type='" &
request.querystring("Type") & "'"
else
sqlStr = "SELECT * FROM MovieList ORDER BY ID DESC"
sqlStr2 = "SELECT COUNT(ID) FROM MovieList"
end if
Conn.Open strConnect
rs.Open sqlStr, Conn
rs2.Open sqlStr2, Conn
response.write rs2.recordcount
......... og en masse kode
--
Hilsen Kasper K