below the codes works. it save files to database whenever user click on it.
but what i want is user uploaded a file to database, and when he uploads again, the uploaded file will replace the previous file leaving the database only have a single file all times. instead of keep on making a new row to store files.
help to correct my code...thanks all.....
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpload.Click
If FileExtensionIsApproved(fUpload.HasFile) Then
Dim test = fUpload.PostedFile.FileName
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ToString)
Dim da As New SqlDataAdapter("Select * From files", con)
Dim MyCB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet()
da.MissingSchemaAction = Missi ...
Go to the complete details ...