vad är det för fel på koden!!!
<%
On Error Resume Next
' Variables
' *********
Dim mySmartUpload
Dim file
Dim oConn
Dim oRs
Dim intCount
Dim ConnectString, conn
Dim ID
intCount=0
' Object creation
' ***************
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
mySmartUpload.AllowedFilesList = "jpg,gif"
mySmartUpload.MaxFileSize = 500000
' Upload
' ******
mySmartUpload.Upload
' Connect to the DB
' *****************
Set oConn = Server.CreateObject("ADODB.Connection")
pictures = Server.MapPath("siteusers.mdb")
oConn.Open "DBQ="& pictures &";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;"
'ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("etellerandet.mdb")
'Set conn = Server.CreateObject("ADODB.Connection")
'conn.open ConnectString," & pictures & "
'DBQ="& pictures &";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;"
' Open a recordset
' ****************
strSQL = "SELECT FILENAME,FILE,username,ID FROM users WHERE username = '" & username & "'"
Set oRs = Server.CreateObject("ADODB.recordset")
Set oRs.ActiveConnection = oConn
oRs.Source = strSQL
oRs.LockType = 3
oRs.Open
' Select each file
' ****************
For each file In mySmartUpload.Files
' Only if the file exist
' **********************
If not file.IsMissing Then
' Add the current file in a DB field
' **********************************
oRs.Update
file.FileToField oRs.Fields("FILE")
oRs("FILENAME") = username & file.FileName
oRs.Update
file.SaveAs("d:\hjemmeside\pictures\" & username & file.filename)
intCount = intCount + 1
End If
Next
' Display the number of files uploaded
' ************************************
Response.Write(intCount & " file(s) uploaded.<BR>")
' Destruction
' ***********
oRs.Close
oConn.Close
Set oRs = Nothing
Set oConn = Nothing
If Err Then
Response.Write("<b>Your Picture is of the wrong kind of type please go back and correct the problem: Only .Jpg and .Gif is allowed !If your think its webmaster´s failure then mail him att: <a href='mailto:webmaster@d-soft.dk?subject=LOGIN FAILURE'><h3>WEBMASTER</h3> </b><br><a href='javascript:self.history.go(-1)'><b><font color='red' font size='2'>Please go back and try again</b></font>" )
else
Response.write ("<b><font size ='2' font color='blue'>Youe have uploaded your picture with success please click below to enter your profile</b></font><br><a href=profile.asp><b><font color='red' font size='2'>Back to profile :-)</b></font>")
end if
'Response.Redirect("profil.asp?updated=true")
%>
------------------
ASP är bäst fuck the rest!!!