webForumDet fria alternativet

Hjälp :-(

12 svar · 296 visningar · startad av jboy_87

jboy_87Medlem sedan aug. 20011 099 inlägg
#1

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!!!

emissionMedlem sedan dec. 19996 721 inlägg
#2

Ehrm...vad går snett?

cyprysMedlem sedan dec. 20003 563 inlägg
#3

Vore trevligt om du berättade vad felet är först.

------------------
MVH // Cyprys
Cyprys
Synd att du inte kan köpa en voodoojordglob och sedan snurra på den fort som fan och skrämma skiten ur alla.

icaaqMedlem sedan okt. 20005 273 inlägg
#4

Vad får du för felmedelande?

------------------
kolung.....det tål att tänkas på!

jboy_87Medlem sedan aug. 20011 099 inlägg
#5

0 file(s) uploaded.
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:

------------------
ASP är bäst fuck the rest!!!

cyprysMedlem sedan dec. 20003 563 inlägg
#6

Ta bort On Error resume next och säg om den säger något vettigt då

------------------
MVH // Cyprys
Cyprys
Synd att du inte kan köpa en voodoojordglob och sedan snurra på den fort som fan och skrämma skiten ur alla.

jboy_87Medlem sedan aug. 20011 099 inlägg
#7

nu får jag detta:

aspSmartUpload (0x800A0035)
File not found: aspsmartuploadutil.dll
/communities/dating system/Sample.asp, line 24

------------------
ASP är bäst fuck the rest!!!

jboy_87Medlem sedan aug. 20011 099 inlägg
#8

när jag tog bort on error resume next

------------------
ASP är bäst fuck the rest!!!

jboy_87Medlem sedan aug. 20011 099 inlägg
#9

har fixat skiten!!!

------------------
ASP är bäst fuck the rest!!!

icaaqMedlem sedan okt. 20005 273 inlägg
#10

Det är bra om du skriver hur du gjorde så andra kan lära sig av dina misstag ;)

------------------
kolung.....det tål att tänkas på!

jboy_87Medlem sedan aug. 20011 099 inlägg
#11

hahaha okej registrerade aspuploadutil.dll

------------------
ASP är bäst fuck the rest!!!

jboy_87Medlem sedan aug. 20011 099 inlägg
#12

hur får jag det hära och bli så här i databasen
Bilder/medlemmar/bla bla.hkjhjh

[Redigerat av jboy_87 den 19 dec 2001]

jboy_87Medlem sedan aug. 20011 099 inlägg
#13

har fixat

------------------
ASP är bäst fuck the rest!!!

124 ms totalt · 3 externa anrop · v20260731065814-full.fb544a5a
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
121 ms — hämta tråd, inlägg och bilagor (db)