Visualizzazione dei risultati da 1 a 2 su 2

Discussione: autorename di Baol

  1. #1

    autorename di Baol

    Ciao,

    impostando nell'upload i baol autorename = true e caricando 2 volte la stessa immagine me la carica correttamente ma nel db mi inserisce in entrambi i campi il nome non rinominato, quindi quello della prima.

    Dove sbaglio?

    Codice PHP:
      <%
    If 
    Request("Upload")="1" then

    Dim oUpload
    Set oUpload
    = new cUpload
    With oUpload
    .SetDatabase "Driver={Microsoft Access Driver (*.mdb)};DBQ=" Server.MapPath("/mdb-database/db") ,  "SELECT * FROM tbl_prodotti"
    .EnabledAspUpload    False
    .EnabledImageSize    False
    .EnabledLog          False
    .AutoRename          True
    .Overwrite             False
    .SetPath "../public/image/"
    .Load



    While Not .EOF
    Select 
    Case lCase(oUpload.Files("InputName"))
    Case 
    "thumb"
    ft1 oUpload.GetFileName()
    Case 
    "big"
    ft2 oUpload.GetFileName()
    End Select



    .Save 
    .MoveNext

    Wend
    'response.Write "<h1>I files " & foto1 &"sono stati moficati. Torna all'[url='home.asp']homepage[/url]</h1>"

    .Database.Open()
    'Inserimento dei valori

    if ft1 <> "" then
    .Database.Fields("
    thumb") = "../public/image/" & ft1
    end if
    if ft2 <> "" then
    .Database.Fields("
    big") = "../public/image/" & ft2
    end if

    if .Form("
    testo") = "" then descr = "" else descr = .Form("testo") end if
    '

    .Database.Fields("
    ID_cat_prodotti") = .Form("select")
    .Database.Fields("
    testo_dett_prodotto") = descr
    '

    'Inserimento
    .Database.AddNew()


    End With
    Set oUpload = Nothing
    response.Redirect("
    prodotti.asp")

    end if



    %> 
    http://www.ecogiochi.it - il primo blogames del pianeta
    http://www.grogonet.com - Grog on network

  2. #2
    uppo questo thread perchè mi serve ancora....
    http://www.ecogiochi.it - il primo blogames del pianeta
    http://www.grogonet.com - Grog on network

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.