mchoudhury
Programmer
Hi Guys,
I'm trying to insert a image into an Access DB, but having bit of a problem sorting the backend codeing. Can someone look at it and tell me how would i amend this inorder to accept image:
Dim PictureCommand As OleDbCommand
Dim InsertBye As Byte = "INSERT INTO Properties ([Picture1]) Values (@Picture1)"
PictureCommand = New OleDbCommand(InsertBye, MyConnection)
PictureCommand.Parameters.Add(New OleDbParameter("@Picture1", OleDbType.VarBinary, 150))
PictureCommand.Parameters("@Picture1").Value = Server.HtmlEncode(Picture1.FileName)
If this is wrong coding, can someone kindly write me a script where images would be inserted into an access DB
Thank You,
Mac
I'm trying to insert a image into an Access DB, but having bit of a problem sorting the backend codeing. Can someone look at it and tell me how would i amend this inorder to accept image:
Dim PictureCommand As OleDbCommand
Dim InsertBye As Byte = "INSERT INTO Properties ([Picture1]) Values (@Picture1)"
PictureCommand = New OleDbCommand(InsertBye, MyConnection)
PictureCommand.Parameters.Add(New OleDbParameter("@Picture1", OleDbType.VarBinary, 150))
PictureCommand.Parameters("@Picture1").Value = Server.HtmlEncode(Picture1.FileName)
If this is wrong coding, can someone kindly write me a script where images would be inserted into an access DB
Thank You,
Mac