tengo un problemilla con ASPUPLOAD y es que me obliga a subir una imagen...
me explico, tengo un formulario con varios campos y 1 de tipo FILE con lo cual subo las imagenes....hasta aqui todo correcto pero cuando relleno todos los campos MENOS el tipo FILE me da un "PU....O" error que no se resolver,
EL ERROR
Error de Microsoft VBScript en tiempo de ejecución error '800a01a8'
Se requiere un objeto
/up_noticias/upl.asp, línea 50
EL CODIGO
Código:
Gracias de antemano. Set Upload = Server.CreateObject("Persits.Upload") ' Capture files Upload.Save(Server.MapPath("cgi-bin/images")) 'Upload.SaveVirtual "cgi-bin" ' Obtain file object Set File1 = Upload.Files("fo1") Set File2 = Upload.Files("fo2") Set File3 = Upload.Files("arc") tit = Upload.Form("tit") artic = Upload.Form("artic") tam = Upload.Form("tam") tam2 = Upload.Form("tam2") tipo = Upload.Form("tipo") targ = Upload.Form("targ") link = Upload.Form("link") cont = Upload.Form("cont") tex=replace(upload.form("tex"),chr(10),"<br>") If File2 Is Nothing Then Set File2 = Upload.Files("fo1") End If If File3 Is Nothing Then Set File3 = Upload.Files("fo1") End If ' Build ODBC connection string Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../noticias.mdb") ' Connect = "Provider=SQLOLEDB;Server=SRV;Database=mydb;UID=sa;PWD=xxx" ' Use ADO Recordset object Set rs = Server.CreateObject("adodb.recordset") ' Reopen recordset to insert file rs.Open "not", Connect, 2, 3 rs.AddNew rs("fo1") = File1.FileName rs("fo2") = File2.FileName rs("arc") = File3.FileName rs("tit") = tit rs("artic") = artic rs("tex") = tex rs("tam") = tam rs("tam2") = tam2 rs("tipo") = tipo rs("targ") = targ rs("link") = link rs("cont") = cont rs("fecha")=now() rs.Update Response.write "<META HTTP-EQUIV='Refresh' CONTENT='2;URL=noticias_main.asp?url=1'>" Response.Write "<p> </p><table width='301' border='0' align='center' cellpadding='0' cellspacing='0' class='bordenegro'><tr><td align='center' valign='middle'><p> </p><b>:: Datos Guardados ::</b><p> </p></tr></td></table>"