Try If (con.State = ConnectionState.Closed) Then con.Open() End If Dim cmd As New OleDbCommand("insert into FileUpload(Sub_Cid,Subject,FileUpload)Values(" & CmboSubCategory.SelectedValue & ",@Subject,@image)", con) cmd.Parameters.AddWithValue("@Subject", Convert.ToString(TxtSubject.Text)) cmd.Parameters.AddWithValue("@image", txtFileUploadPath.Text) cmd.ExecuteNonQuery() MessageBox.Show("file Upload") con.Close() Catch ex As Exception MessageBox.Show(ex.ToString()) End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)