Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/05/2002, 17:04
Avatar de g_susdaniel
g_susdaniel
 
Fecha de Ingreso: mayo-2001
Ubicación: Frente al Monitor :þ
Mensajes: 995
Antigüedad: 23 años, 10 meses
Puntos: 0
Re: Por favor es algo urgente

Seria algo asi... dependeria tambien de que metodo uses para el UPLOAD, pero lo otro kedari asi mas o menos...

<html>
<head>
<title>Upload</title>
</head>
<%
Dim conexion,sql,basedatos, file, titulo, desc

'recoge las variables
file = Request.Form("file")
titulo = Request.Form("titulo")
desc = Request.Form("desc") & chr(13)

If file = "" then
%>
<table>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="up.asp">
<tr><td><b>Selecciona el archivo* </b><br><INPUT TYPE=FILE SIZE=50 NAME="file"></td></tr>
<tr><td><b>Titulo: </b><br><INPUT TYPE=TEXT SIZE=40 NAME="titulo"></td></tr>
<tr><td><b>Descripcion: </b><br><textarea name="desc" rows="10" cols="80"></textarea></td></tr>
<tr><td><br><input type="Submit"></td></tr>
</FORM>
</table>
<%
Else
'El upload lo haces por esta parte y luego lo metes en tu BD asi
sql = "INSERT INTO tu_tabla (file, titulo, desc) VALUES ('" & file & "', '" & titulo & "', '" & desc & "')"
Set conexion=Server.CreateObject("ADODB.Connectio n")
basedatos=Server.MapPath("tu_base.mdb")
conexion.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& basedatos & ";"
conexion.execute sql

conexion.Close
Set conexion = Nothing
end if
Response.Write "Listo"
'Ahora puedes colocar un mensaje o un redireccionamiento
%>
</body>
</html>

Conste que no lo probé cualkier fallo puede suceder de todas maneras mas tarde lo reviso ahorita no tengo como, pero como dijiste que es URGENTE ;)

<div align=right><embed src="http://www.jesusdaniel.venezuela.com/jd.swf" height=25 width=200 wmode="transparent"></embed><br>Usuario # 3359 en los foros</div>