Problemer med Upload komponent fra www.dundas.com
Mit webhotel anvender upload komponenten fra www.dundas.com - Jeg er vant til ASPsmartUpload, og skal nu konvertere... Jeg har følgende kode:Set myUpload = Server.CreateObject(\"Dundas.Upload.2\")
myUpload.SaveToMemory
strConnection = DBConnect
Set DBConnection = Server.CreateObject(\"ADODB.Connection\")
DBConnection.Open strConnection
SQL1 = \"UPDATE pages SET pagetext1 = \'\" & myUpload.Form(\"tekst1\") & \"\', pictext1 =\'\" & myUpload.Form(\"billedtext1\") & \"\', \"
SQL1 = SQL1 & \"pagetext2 = \'\" & myUpload.Form(\"tekst2\") & \"\', pictext2 =\'\" & myUpload.Form(\"billedtext2\") & \"\', \"
SQL1 = SQL1 & \"pagetext3 = \'\" & myUpload.Form(\"tekst3\") & \"\', pictext3 =\'\" & myUpload.Form(\"billedtext3\") & \"\', \"
SQL1 = SQL1 & \"pagetext4 = \'\" & myUpload.Form(\"tekst4\") & \"\' \"
SQL1 = SQL1 & \"WHERE id = \" & pageid
DBConnection.Execute(SQL1)
imgNR=0
For Each file In myUpload.Files
imgNR = imgNR+1
Randomize
imgNumber = Int(9999999999 * Rnd)
\'If file.FileExists Then
file.SaveAs (\"../log/pg\" & imgNumber & \".\" & file.GetFileExt)
SQL2 = \"UPDATE pages SET picture\" & imgNR & \" = \'pg\" & imgNumber & \".\" & file.GetFileExt & \"\' WHERE id = \" & pageid
DBConnection.Execute(SQL2)
\'End If
Next
Set DBConnection = Nothing
Response.Redirect (\"default.asp\")
Det giver fejlen:
Microsoft VBScript runtime error \'800a01b6\'
Object doesn\'t support this property or method: \'file.GetFileExt\'
Jeg kan ikke helt se, hvad der er galt... Please help...
