Hi kulrom, so what if i want the photo to save the same row as other data?
I have this code to insert into the db:
Dim strConn AsString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath("movie.mdb")
Dim cmd AsNew OleDbCommand("INSERT INTO movieDet ([Title], [price], [des], [Year], [branch], [section], [category], [type], [actor]) VALUES('" & tb_title.Text & "','" & tb_price.Text & "','" & tb_des.Text & "','" & tb_year.Text & "','" & CheckBoxList1.SelectedValue & "','" & RadioButtonList1.SelectedValue & "','" & RadioButtonList2.SelectedValue & "','" & RadioButtonList3.SelectedValue & "','" & tb_actor.Text & "')", New OleDbConnection(strConn))
And i have this codes to insert into the table but i want it to be the same row as above datas:
Dim cnn AsNew OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\Inetpub\wwwroot\button\movie.mdb")
Dim strSQL AsString = "INSERT INTO movieDet(pic) VALUES('" + File1.PostedFile.FileName + "') WHERE Title like '" &tb_title.Text& "' "
Dim cmd2 AsNew OleDbCommand(strSQL, cnn)
Dim dr As OleDbDataReader
But it don't seems like working. Help Please! thank you!
Rdgs,
tiffany
I have this code to insert into the db:
Dim strConn AsString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath("movie.mdb")
Dim cmd AsNew OleDbCommand("INSERT INTO movieDet ([Title], [price], [des], [Year], [branch], [section], [category], [type], [actor]) VALUES('" & tb_title.Text & "','" & tb_price.Text & "','" & tb_des.Text & "','" & tb_year.Text & "','" & CheckBoxList1.SelectedValue & "','" & RadioButtonList1.SelectedValue & "','" & RadioButtonList2.SelectedValue & "','" & RadioButtonList3.SelectedValue & "','" & tb_actor.Text & "')", New OleDbConnection(strConn))
And i have this codes to insert into the table but i want it to be the same row as above datas:
Dim cnn AsNew OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\Inetpub\wwwroot\button\movie.mdb")
Dim strSQL AsString = "INSERT INTO movieDet(pic) VALUES('" + File1.PostedFile.FileName + "') WHERE Title like '" &tb_title.Text& "' "
Dim cmd2 AsNew OleDbCommand(strSQL, cnn)
Dim dr As OleDbDataReader
But it don't seems like working. Help Please! thank you!
Rdgs,
tiffany
Last edited by a moderator: