RhodesB4A Member Licensed User Longtime User Sep 8, 2013 #1 Hi, The update statement does not seem to work for updating (replacing in this case) a picture that's already sitting in the DB. The insert statement works just fine though. Below is the code I use. Thanks in advance. Code: Copy Main.aSQL.ExecNonQuery("UPDATE product SET Name = '" & txtEDITName.Text & "' , Price = " & txtEDITprice.Text & " , Size = " & txtEDITSize.Text & ", Type = '" & txtEDITType.Text & " , Picture = " & Array As Object(Buff) & " WHERE ProductID = " & theProdID)
Hi, The update statement does not seem to work for updating (replacing in this case) a picture that's already sitting in the DB. The insert statement works just fine though. Below is the code I use. Thanks in advance. Code: Copy Main.aSQL.ExecNonQuery("UPDATE product SET Name = '" & txtEDITName.Text & "' , Price = " & txtEDITprice.Text & " , Size = " & txtEDITSize.Text & ", Type = '" & txtEDITType.Text & " , Picture = " & Array As Object(Buff) & " WHERE ProductID = " & theProdID)
D dxxxyyyzzz Member Licensed User Longtime User Sep 8, 2013 #2 Try: Code: Copy Main.aSQL.ExecNonQuery2("UPDATE product SET Name=?, Price=?, Size=?, Type=?, Picture=? WHERE ProductID='" & theProdID & "'", Array As Object( txtEDITName.Text, txtEDITprice.Text, txtEDITSize.Text, txtEDITType.Text, Buffer)) Upvote 0
Try: Code: Copy Main.aSQL.ExecNonQuery2("UPDATE product SET Name=?, Price=?, Size=?, Type=?, Picture=? WHERE ProductID='" & theProdID & "'", Array As Object( txtEDITName.Text, txtEDITprice.Text, txtEDITSize.Text, txtEDITType.Text, Buffer))