Getting data from fields

Results 1 to 2 of 2

Thread: Getting data from fields

  1. #1
    Join Date
    Dec 1969

    Default Getting data from fields

    Hi I have the following code in my page<BR><BR>&#060;%<BR> strSQLQuery = "SELECT qtyonhnd, atyalloc, qtybkord FROM IV00102 WHERE itemnmbr=&#039" & Replace(Request("SKU"),"&#039","&#039&#039") & "&#039"<BR> Set qty = Server.CreateObject("ADODB.Recordset")<BR> qty.Open strSQLQuery, conn, 3, 3<BR><BR>%&#062;<BR><BR><BR>and then I show it with<BR><BR>&#060;% IF NOT QTY.EOF THEN<BR> Response.Write ("&#060;font face=verdana size=2 color=navy&#062; ") & qty("qtyonhnd") <BR> End If%&#062;<BR><BR>But then nothing is showing on the page, no errors, but nothing else.<BR><BR>If however I change the <BR><BR>" & Replace(Request("SKU"),"&#039","&#039&#039") & "<BR><BR>bit to a stock number is works fine, basically the SKU bit is a stock number..have I missed a silly bit of code or something?<BR><BR>I would really really appreciate any help.<BR><BR>Thansk alot<BR><BR>Caroline

  2. #2
    Pat Murphy Guest

    Default RE: Getting data from fields

    Is Itemnmbr defined as a NUMBER? If so, Lose the single (or double) quotes. <BR>itemnmbr=&#039" & Replace(Request("SKU"),"&#039","&#039&#039") & "&#039"<BR><BR>Also:<BR>The return value of the Replace function is a string, with substitutions made, that begins at the position specified by start and and concludes at the end of the expression string. It is not a copy of the original string from start to finish.<BR><BR>I use a Function to perform the Replace for Quotes...don&#039t know if this helps....<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts