richch
Messages postés58Date d'inscriptionlundi 21 février 2005StatutMembreDernière intervention 4 janvier 2008
-
20 mai 2005 à 16:38
ronflex38
Messages postés16Date d'inscriptionmardi 8 juin 2004StatutMembreDernière intervention25 mai 2005
-
23 mai 2005 à 00:27
J'ai cherche à inserer dans la BD le nom du fichier à uploader sur le serveur, j'utilise aspSmartUpload pour l'upload.
Je développe en ASP.
Merci
richch
Messages postés58Date d'inscriptionlundi 21 février 2005StatutMembreDernière intervention 4 janvier 2008 22 mai 2005 à 00:38
Merci pour le code, mais ça ne marche pas, veuillez me donné les tables et les champs du BD ainsi, veuillez tester le code vous même puis donne moi tout le code correctement exécuté car je suis un débutant.
' Recherche du n° auto maxi pour un incrémentation pour changer le nom du fichier
maxi=RS("Max")+1
RS.close
' Object creation
' ***************
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
' Upload
' ******
mySmartUpload.Upload
' Select each file
' ****************
For each file In mySmartUpload.Files
' Only if the file exist
' **********************
If not file.IsMissing Then
' Save the files with his original names in a virtual path of the web server
' ****************************************************************************
file.SaveAs(maxi & "_" & file.FileName)
' sample with a physical path
' Display the properties of the current file
' ******************************************
Set RS = Server.Createobject("ADODB.Recordset")
' Insertion du chemin ou le fichier est stocké dans la base