Hi there using Microsoft Commerce Server and I'm new to SQL and development so I'm hoping someone here might be able to help me.
I'm trying to customize my 'product_new.asp' page to include my own additional fields which will be posted into my SQL db.
My form is populated with 2 types of fields...text boxes and check boxes.
<INPUT TYPE="text" SIZE="32" NAME="name" VALUE="<%= Request("name") %>" onChange="dirty = true"><input type="checkbox" name="web_publish" value="<%= Request("web_publish") %>" onChange="dirty = true" checked>
I've been trying to use the following code to update the fields in the db.
cmdTemp.CommandText = Replace("SELECT * FROM store_product WHERE pf_id = ?", "?", "'" & Replace(Request("pf_id"),"'","''") & "'")
Set rsProduct = Server.CreateObject("ADODB.Recordset")
rsProduct.Open cmdTemp, , adOpenStatic, adLockOptimistic
rsProduct.AddNew
rsProduct("pf_id").value = pf_id
rsProduct("name").Value = mscsPage.RequestString("name", "", 1, 255)
rsProduct("web_publish").Value = mscsPage.RequestNumber("web_publish", "", 1, 255)
rsProduct.Update
The properties for the 'web_publish' field in SQL is set as a small (one byte) integer field.
The 'name' value works okay... 'web_publish' does not. I really don't know what I'm doing someone please help! I hope all of this makes sense to you.
Thanks.
KEV