FileReceived its saving 2 times the name of 1 image on db

Mar 3, 2009 at 4:59 PM

i have a problem i dont know why but when i upload an image and i save the name on my db it saves two times the same registry its like its doing two times the function what i dont understand its that it saves the image only 1 time on the folder that i choose 
at first the control was working perfectly but one day when i uploaded some images it started to doing this

 

<

 

script>
function

 

FileStateChanged(uploader, file, httpStatus, isLast){
    Flajaxian.fileStateChanged(uploader, file, httpStatus, isLast);
    if(isLast){
    document.location.href =
"edit_fotos.aspx"
    }
}
 </script>


<

 

fjx:FileUploader ID="FileUploader1" runat="server" OnFileReceived="FileReceived"
JsFunc_FileStateChanged="FileStateChanged" RequestAsPostBack="True">
</fjx:FileUploader>




Protected Sub FileReceived(ByVal sender As Object, ByVal e As com.flajaxian.FileReceivedEventArgs)
        Dim i_user as string = var_user
        Dim id_user as string = var_title
        Dim i_category as string = DropDownList1.SelectedValue
        Dim i_album as string= var_album
        Dim i_title as String = "my picture"
        Dim i_image As String


        i_image = e.File.FileName

        Dim Conexion = Server.CreateObject("ADODB.connection")
        Conexion.open("Driver={MySQL ODBC 3.51 Driver};Server=XX.XXX.XXX.XX;Port=3306;Database=XXXX;Uid=XXXX;Pwd=XXXX;OPTION=3;")
        Dim sqlstr = "INSERT INTO `album` (`user` , `img_name` , `category` , `title` , `album` ) VALUES ('" & i_user & "', '" & i_image & "', '" & i_category & " ', '" & i_title & "', '" & i_album & "');"
        Conexion.execute(sqlstr)
        Conexion.close()
    End Sub