Intern HTTP 500 - serverfejl - ASP / ACCESS
Hejsa, jeg får en Intern HTTP 500 - serverfejl. Jeg har ingen mulighed for at se fejlen og vil se om nogen her kan se den ud fra koden.Jeg har en form asp hvor dataerne bliver rettet i, og upon post bliver smidt til asp siden herunder for updatering i access databasen.
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsUpdateEntry 'Holds the recordset for the record to be updated
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be updated
'Read in the record number to be updated
lngRecordNo = CLng(Request.Form("ID"))
'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("/log/database.mdb") & "; password=xxx"
'Create an ADO recordset object
Set rsUpdateEntry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM nyheder WHERE ID=" & lngRecordNo
'Set the cursor type we are using so we can navigate through the recordset
rsUpdateEntry.CursorType = 2
'Set the lock type so that the record is locked by ADO when it is updated
rsUpdateEntry.LockType = 3
'Open the tblComments table using the SQL query held in the strSQL varaiable
rsUpdateEntry.Open strSQL, adoCon
'Update the record in the recordset
rsUpdateEntry.Fields("overskrift") = Request.Form("overskrift")
rsUpdateEntry.Fields("indhold") = Request.Form("indhold")
'Write the updated recordset to the database
rsUpdateEntry.Update
'Reset server objects
rsUpdateEntry.Close
Set rsUpdateEntry = Nothing
Set adoCon = Nothing
'Return to the update select page incase another record needs deleting
Response.Redirect "retnyhed.asp"
%>