Asp - Programmation
Marsh Posté le 27-02-2002 à 15:07:35
Bonjour, est ce ke kkn serait capable de corriger mon code ? je souhaire uploader un fichier sur mon site en utilisant le composant aspupload, mais ça ne marche pas... <% Set Upload = Server.CreateObject("Persits.Upload.1" ) ' Capture files Upload.Save "/upload" ' Obtain file object Set File = Upload.Files("FILE1" ) If Not File Is Nothing Then ' Build ODBC connection string Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("." ) & "\clients.mdb;" ' Build SQL INSERT statement SQL = "INSERT INTO Fichier (nomfichier)" _ & " VALUES('" & request(File.Filename) "'" ' Save to database File.ToDatabase Connect, SQL Response.Write "File saved." Else Response.Write "File not selected." End If %>
Marsh Posté le 27-02-2002 à 17:18:47
Tu devrais etre plus precis dans ton sujet. Par exemple : "[ASP] Upload de fichiers" Desole je ne peuxpas t'aider, je connais pas ASP. hihi
Make sure you enter the(*)required information where indicate.HTML code is not allowed
Marsh Posté le 27-02-2002 à 15:07:35
Bonjour, est ce ke kkn serait capable de corriger mon code ?
je souhaire uploader un fichier sur mon site en utilisant le composant aspupload, mais ça ne marche pas...
<%
Set Upload = Server.CreateObject("Persits.Upload.1" )
' Capture files
Upload.Save "/upload"
' Obtain file object
Set File = Upload.Files("FILE1" )
If Not File Is Nothing Then
' Build ODBC connection string
Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("." ) & "\clients.mdb;"
' Build SQL INSERT statement
SQL = "INSERT INTO Fichier (nomfichier)" _
& " VALUES('" & request(File.Filename) "'"
' Save to database
File.ToDatabase Connect, SQL
Response.Write "File saved."
Else
Response.Write "File not selected."
End If
%>