Yeap, post what you have thus far and we can work out the kinks![]()
Yeap, post what you have thus far and we can work out the kinks![]()
jmurrayhead
If you agree, give me rep.
If you like it here...throw us a few bones to help support us.
Thanks JMurrayhead,
Here is the code for the comments field on the EDIT view (sorry this one is comment vs RolloutComments in the 1st post but its the exact thing). This is the screen that shows it cut off after the double quotes.
Just posting the code below for the search results screen just so you know what I have there - on this screen it shows the whole comment.Code:<TD><input class="clrBg" type="text" tabIndex="26" name="Comments<%response.write(i)%>" size="200" maxlength="200" value="<%= rs("Comments") %>"</TD>
Code:<TD><%=rs("Comments")%> </TD>
You have a maxlength set for 200 characters. Is it possible the text you are outputting is longer?
Otherwise, post your insert code so we can determine the problem from there.
jmurrayhead
If you agree, give me rep.
If you like it here...throw us a few bones to help support us.
Ok, checked my table and is set to varchar 200. and i checked, I'm not entering more than 200. I can enter something like - 8" Hammer tool and it will add it to the database with no problems, it's only when I get back to my edit screen it will show only 8 and cut off the " Hammer tool. It's like it's there but not showing in the text box.
Below is the insert code:
Code:<% Set rs = Server.CreateObject("ADODB.Recordset") 'build SQL sSql = "update tblList set RegionID = " & strRegionID & ", DistrictID= " & strDistrictID & ", CatID= '" & strCatID & "',ALSize= '" & strALSize & "', ItemDesc = '" & strItemDesc & "', ToolNum = '" & strToolNum & "', EQNum = '" & strEquip & "', ETA = '" & strETA & "', DateShip = convert(datetime, '" & strDateShip & "'), Comments = '" & ValidateStr(strComments) & "', DateOrd = '" & strDateOrd & "', Vendor = '" & strVendor & "', CollarUSD = convert(money, '" & strCollarUSD & "'), TaxUSD = convert(money, '" & strTaxUSD & "'), Cost = convert(money, '" & strCost & "')" sSql = sSql & " WHERE ListID = " & sListID & " " rs.Open sSql, Conn, 3, 1 nCounter = nCounter + 1 sListID = Request("ListIDRow" & nCounter) Loop response.redirect "SearchResults.asp" Conn.Close Set Conn = Nothing %>
Okay, so maybe we do need to double up the double quotes. So change that function to this:
Try running this now.Code:Function ValidateStr(strValue) strTemp = strValue strTemp = Trim(strTemp) strTemp = Replace(strTemp,"'","''") strTemp = Replace(strTemp, chr(34), chr(34) & chr(34)) ValidateStr = strTemp End Function
jmurrayhead
If you agree, give me rep.
If you like it here...throw us a few bones to help support us.
Thanks JMurrayhead,
hmm...that made this 8" Hammer into 8"" Hammer when added to the database.
But when I got back in the edit mode, it still only made 8.![]()
Remove the extra code I added to that function and post the code you're using to output the data to the screen.
jmurrayhead
If you agree, give me rep.
If you like it here...throw us a few bones to help support us.
don't change the quote when inserting, but when you display it ... use this
Code:function checkOutTxt(strValue) checkOutTxt = replace(strValue,"""",""") end function <TD><input class="clrBg" type="text" tabIndex="26" name="Comments<%response.write(i)%>" size="200" maxlength="200" value="<%= checkOutTxt(rs("Comments")) %>"</TD>
Quote of the Month:
INSIGHT: When the going gets tough, the tough get going. The smart left a long time ago.
Questions to Ponder:
Are people more violently opposed to fur rather than leather because it's much easier to harass rich women than motorcycle gangs?
iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright © 2008 sbenj69
Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.
Hi JMurrayhead,
Ok, that was the code I posted yesterday .... I noticed I was using double quotes around the rs value, I changed that to single and it looks like it's working now.....I can see the whole comment 8" Hammer in edit view.
See in red.
Thank you for your help with this!Code:<TD><input class="clrBg" type="text" tabIndex="26" name="Comments<%response.write(i)%>" size="200" maxlength="200" value='<%= rs("Comments") %>'</TD>![]()
Thanks Mehere!!!
That was it!!!
Works well!!!
Bookmarks