View Single Post
  #2 (permalink)  
Old February 20th, 2004, 12:36 PM
DaveGerard DaveGerard is offline
Friend of Wrox
Join Date: Sep 2003
Location: Minneapolis, MN, USA.
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post

Try this...

ProductId = request("ProductId")
Category = request("Category")

cn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=F:\Projects\MyProject\Database\ b;"

set rs = server.createobject("adodb.recordset")
sql = "select * from Product where idProduct = '" & ProductId & "'" sql, cn, 3, 3
if rs.eof then
end if
    rs("Description") = Desc
    rs("Category") = Category
    rs("ShortDetails") = ShortDesc
    rs("DetailedDescription") = DetailDesc

This code will add the ProductId if it doesn't exist and modify it if it does. This is also provided that your ProductId is an alpha-numeric value rather than a number. If your ProductId is a number then you must not have it enclosed within apostrophes. Forget the function 'getfromdatabase()'. Make sure your memo field is last in the update. Not sure if it matters with an update, but it does matter when you include memo fields within your criteria so it might apply here too. Let me know if this helps.


Reply With Quote