Hej. Jeg er ved at lave et forum og er ved at lave "Opret Bruger"-systemet. Jeg har lavet siden med tekstfelterne hvor brugeren skal skrive brugernavn, adgangskode, mail, mm.
Men jeg kan ikke få database indsætningskoden til at virke.
Hvad er der galt?
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("database.mdb")
Conn.Open DSN
strSQL = "Insert into users ("
strSQL = strSQL & "Username, "
strSQL = strSQL & "Password, "
strSQL = strSQL & "Name, "
strSQL = strSQL & "Age, "
strSQL = strSQL & "Interests, "
strSQL = strSQL & "Signature, "
strSQL = strSQL & "Mail, "
strSQL = strSQL & "Date, "
strSQL = strSQL & "Posts, "
strSQL = strSQL & "Points, "
strSQL = strSQL & "Type) "
strSQL = strSQL & "values( "
strSQL = strSQL & "'" & Request.Form("username") & "', "
strSQL = strSQL & "'" & Request.Form("password") & "', "
strSQL = strSQL & "'" & Request.Form("name") & "', "
strSQL = strSQL & "'" & Int(Request.Form("age")) & "', "
strSQL = strSQL & "'" & Request.Form("interests") & "', "
strSQL = strSQL & "'" & Request.Form("signature") & "', "
strSQL = strSQL & "'" & Request.Form("mail") & "', "
strSQL = strSQL & "'" & Date & "', "
strSQL = strSQL & "'0', "
strSQL = strSQL & "'0', "
strSQL = strSQL & "'user')"
Conn.Execute(strSQL)
Conn.Close
Set Conn = Nothing
%>