problem med counter med database
Hmm somethings wrong ... og jeg kan ikke finde fejlen ..nogen der har nogle ideer ?
<%
'simple database counter by Python
'open the database and check number
tempConn = "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("cgi-bin/dati.mdb") & ";UID=admin;PWD=unga;"
Set myConn = Server.CreateObject("ADODB.Connection")
strSQL = "SELECT * FROM count WHERE (ID = 0);"
myConn.Open tempConn
Set rs = myConn.Execute(strSQL)
iCount = rs("number")
Set rs = Nothing
'Increment the count
iCount = iCount + 1 <-- Line 10
'Update the database
strSQL = "UPDATE count SET count = " & iCount & ";"
myConn.Execute(strSQL)
myConn.Close
Set myConn = Nothing
' We're all done with the hard part
' All that's left is to display the results
Response.Write iCount
%>
Den her error kommer:
Error Type:
ADODB.Field (0x800A0BCD)<br><b>/counter.inc, line 10
