DW 8 Patch - Recordset Code Change

Hi All...
I've just updated my DW 8.0 to 8.0.2 due to the recent SQL Injection attacks.
Some of my recordsets are complex and i'm having trouble updating one in particilar.
I've posted the old code and the new code below.
I can see that the problem is caused in the SQL Select Statement code that the new patch creates   'Where RelatedProductID=?"
I'm hoping someone can offer a solution before i pull all my hair out :-)
Fingers crossed and thanks in advance
Andy
Here is the SQL Statement i put in to DW - problem highlighted in red
SELECT RelatedProducts.ProductID, Products.Product  FROM RelatedProducts INNER JOIN Products ON RelatedProducts.ProductID = Products.ProductID  where RelatedProductID=param  UNION  SELECT RelatedProducts.RelatedProductID, Products.Product
FROM RelatedProducts INNER JOIN Products ON RelatedProducts.RelatedProductID = Products.ProductID
WHERE RelatedProducts.ProductID=param
ORDER BY Product
and the page code generated:
<%
Dim RelatedProductsRS__param
RelatedProductsRS__param = "1"
If (ProductID   <> "") Then
  RelatedProductsRS__param = ProductID 
End If
%>
<%
Dim RelatedProductsRS
Dim RelatedProductsRS_cmd
Dim RelatedProductsRS_numRows
Set RelatedProductsRS_cmd = Server.CreateObject ("ADODB.Command")
RelatedProductsRS_cmd.ActiveConnection = MM_my_STRING
RelatedProductsRS_cmd.CommandText = "SELECT RelatedProducts.ProductID, Products.Product  FROM RelatedProducts INNER JOIN Products ON RelatedProducts.ProductID = Products.ProductID  where RelatedProductID=? UNION  SELECT RelatedProducts.RelatedProductID, Products.Product FROM RelatedProducts INNER JOIN Products ON RelatedProducts.RelatedProductID = Products.ProductID WHERE RelatedProducts.ProductID=param ORDER BY Product"
RelatedProductsRS_cmd.Prepared = true
RelatedProductsRS_cmd.Parameters.Append RelatedProductsRS_cmd.CreateParameter("param1", 5, 1, -1, RelatedProductsRS__param) ' adDouble
Set RelatedProductsRS = RelatedProductsRS_cmd.Execute
RelatedProductsRS_numRows = 0
%>
Old SQL statement before the patch - old code highlighted in red
<%
Dim RelatedProductsRS__param1
RelatedProductsRS__param1 = "1"
If (ProductID  <> "") Then
  RelatedProductsRS__param1 = ProductID
End If
%>
<%
Dim RelatedProductsRS
Dim RelatedProductsRS_numRows
Set RelatedProductsRS = Server.CreateObject("ADODB.Recordset")
RelatedProductsRS.ActiveConnection = MM_my_STRING
RelatedProductsRS.Source = "SELECT RelatedProducts.ProductID, Products.Product  FROM RelatedProducts INNER JOIN Products ON RelatedProducts.ProductID = Products.ProductID  where RelatedProductID=" + Replace(RelatedProductsRS__param1, "'", "''") + "  UNION  SELECT RelatedProducts.RelatedProductID, Products.Product  FROM RelatedProducts INNER JOIN Products ON RelatedProducts.RelatedProductID = Products.ProductID  WHERE RelatedProducts.ProductID=" + Replace(RelatedProductsRS__param1, "'", "''") + "  ORDER BY Product"
RelatedProductsRS.CursorType = 0
RelatedProductsRS.CursorLocation = 2
RelatedProductsRS.LockType = 1
RelatedProductsRS.Open()
RelatedProductsRS_numRows = 0
%>

Hi bregent
Thank you for responding to my post.
With a fresh pair of eyes on me this morning, i managed to sort the problem out.
I simply removed the param's in the DW Recordset Bindings and re-added them using a separate param for each instance the param was called in the SQL Statement.
All working fine now :-D
I have a new problem on the product insert page - please see my latest post if you could possibly help!
Thanks Again
So now the generated code looks like:
<%
Dim RelatedProductsRS__param
RelatedProductsRS__param = "1"
If (ProductID   <> "") Then
  RelatedProductsRS__param = ProductID 
End If
%>
<%
Dim RelatedProductsRS__param2
RelatedProductsRS__param2 = "1"
If (ProductID <> "") Then
  RelatedProductsRS__param2 = ProductID
End If
%>
<%
Dim RelatedProductsRS
Dim RelatedProductsRS_cmd
Dim RelatedProductsRS_numRows
Set RelatedProductsRS_cmd = Server.CreateObject ("ADODB.Command")
RelatedProductsRS_cmd.ActiveConnection = MM_myconnection_STRING
RelatedProductsRS_cmd.CommandText = "SELECT RelatedProducts.ProductID, Products.Product  FROM RelatedProducts INNER JOIN Products ON RelatedProducts.ProductID = Products.ProductID  where RelatedProductID=? UNION  SELECT RelatedProducts.RelatedProductID, Products.Product FROM RelatedProducts INNER JOIN Products ON RelatedProducts.RelatedProductID = Products.ProductID WHERE RelatedProducts.ProductID=? ORDER BY Product"
RelatedProductsRS_cmd.Prepared = true
RelatedProductsRS_cmd.Parameters.Append RelatedProductsRS_cmd.CreateParameter("param1", 5, 1, -1, RelatedProductsRS__param) ' adDouble
RelatedProductsRS_cmd.Parameters.Append RelatedProductsRS_cmd.CreateParameter("param2", 5, 1, -1, RelatedProductsRS__param2) ' adDouble
Set RelatedProductsRS = RelatedProductsRS_cmd.Execute
RelatedProductsRS_numRows = 0
%>

Similar Messages

  • Why have the patch return codes changed?

    When patching sparc Solaris 10, have the patch return code 2's now become code 1's? Why the change? Is there documentation somewhere about this? What other ones have changed?

    Code 1 could indicate a number of different things besides patch allready installed which there is a code allready for. I do not really have the time to search through all the logs to verify this. I believe this is a problem that needs addressed.

  • DW CS4 keeps duplicating recordset code after opening/editing a recordset

    Hi all,
    I'm wasting lots of time editing and re-editing recordsets in DW CS4 using the PHP server model.
    After opening a recordset an making changes, DW will break the recordset code duplicating it.
    This appen even if I open and suddendly close the recordset without making any changes.
    This is a critical bug.
    Is there a fix/update/workaround?
    At this time the solution is to delete the recordset in the code view (paying attention to not delete something useful) and to re-create it by scratch.
    This is not a sample to feature the screamed adobe productivity applications.
    Any suggestion will be really appreciated.
    TIA
    tony

    This forum is for Extension Authoring, so you'll probably get a better response from the DW Application Development forum.
    Try uninstalling all of your extensions to see if that fixes the problem. If so, then just install extensions 1 at a time as you need them to help isolate the problem. Next, I'd try deleting your entire User Configuration folder. Otherwise, uninstalling and reinstalling DW may be the only way to fix it.
    HTH,
    Randy

  • Ship to party Jursidiction code change at line item leve in Sales order

    Hell Gurus,
             Here is requirement for enhancement in Sales order. For determining tax following logic is requird to modify jursidiction code of ship-to party at line item level.
    after entering header details and line item, then user exit should be there(which user exit??) and i need to compare countries of Ship-from(Plant i believe) and Ship-to party(customer) if country is same, then jursidiction code of Ship-to party at line item level should be changed with value from Jursidiction code of Ship-from party(plant this value will come from <b>T001W</b>) table. this should happen before save(while entering line items, user may go and check jursidiction code change)
    what i need here is which user exit is triggerd ater line item entry, and how to change jursidiction value( i believe we need XVBAP, XVBPA, might be XADRC(Jursidiction code) . if some one provide user exit and logic with structure details then it would be of great help.
    hoping to get reply
    Thanks in Advance
    Siva

    Can you check in MV45AFZB Include but i am not sure
    FORM USEREXIT_FILL_VBAP_FROM_HVBAP.
    VBAP-zzfield = HVBAP-zzfield2.
    ENDFORM.
    FORM USEREXIT_SOURCE_DETERMINATION.
    set source
    VBAP-WERKS          = zzfield1.
    set item category
    VBAP-PSTYV          = zzfield2.
    ENDFORM.
    *eject
    Reward Points if it is helpful
    Thanks
    Seshu

  • Created file in illustrator then opened in photoshop but color code changed?

    I Created file in illustrator and then opened the art in photoshop but the wierd thing is that the color code changed. If you look at the image with you eye the color will look the same to the naked but if you use the eye dripper tool you can see that the color code has changed between illustrator and photoshop.
    Is there a way to make the CMYK color code stay the same?

    In Illustrator the "Edit---> color settings" are set to "North America General Purpose 2" and the that is the same color setting choice in Photoshop.
    For example there is a black color in Illustrator that has this CMYK code "60, 49,47, 100"
    but in photoshop the CMYK code for the same part of the graphic changes to "75, 68, 67, 90"
    This is only one example of many color code changes that are happening and this may look like the same color on the screen but I need them to both have the same code because I am doing specialized printing and need no changes in color codes like this to occur.
    If I have the color setting in both photoshop and illustrator both set exactly the same "Edit---> color settings" then do you know why this color shift would be happening. Please help.

  • How to handle source code changes in apex

    hi all,
    can anybody help me plz...
    how to handle source code changes in apex.
    which development process is best suite for apex.
    Regards
    Alekh

    Thanks Andy, so as per the suggestion we have to handle the above snippet as individual if block statements as i had shown below.
    But in this case how we show the else part as NULL.
    correct me if my understanding is wrong.
    if  'Products' in (:P1_ENG_GRP1, :P1_ENG_GRP2, :P_ENG_GRP3) then
                    lv_to_email_id :='[email protected]';
    end if;
    if  'Materials' in (:P1_ENG_GRP1, :P1_ENG_GRP2, :P_ENG_GRP3) then
               lv_to_email_id :='[email protected]';
    end if;Thanks,
    Anoo..

  • Code changes are not reflecting

    Hi,
    I am facing one strange issue.
    One of my colleague developer made some code changes. He checkin the code and was transported successfully to quality system. The changes are working fine in quality system.
    Now using my NWDS I synced the code by connecting to NWDI. When I build and deployed the code in my local server I am not able to see the all the code changes in my system. I am able to see some label changes but not all the code changes.
    I checked the deployment of my local server by keeping some print statements and it is fine.
    I removed the entire configuration from Development Configurations perspective and imported the configuration, created the project again. But still I am facing the same issue.
    Can anyone help me in resolving this issue.
    Regards
    MQ

    Hello MQ,
    That is weired..Can you check in C:/USR/...  where your JSP's and Java classes gets deployed. See if you get the changes deployed at this location you are looking for. You need to decompile your class file to Java file to see the content of it. If you still have issues , remove all the DC's from your NWDS, import again from the track , undeploy your EAR from SDM, and deploy it again.
    But some other functionalities which are coming in my system are not coming in that system.  Did you deploy to any server? If so, are you seeing all your changes on the server. Check you are connecting to right NWDI and to the right track.
    I am sure you might have tried all these options..but nothing is striking to my  mind at this time.
    Thanks,
    Raj

  • Time code changes when reconnecting  media

    I have been working on a project for over year. Recently my computer was stolen when shooting abroad and now I had to buy a new one (leopard op sys) and reinstall my software to continue working. As I recapture the lost media a warning window pops out: "you are about to capture non drop frame media to a drop frame clip......". My media was shot with a panasonic 100a (24p), and since I started the project I have been capturing with the DV NTSC setting (it captures 29.97 drop frame). When I recapture, the clips in the browser appear as reconnected but the TIME CODE changes, and clips on the timeline referencing that media still appear offline (others don't even if the referenced clip is the same). If I try to reconnect from the timeline it tells me that media start and end do not match. I will appreciate any suggestions.

    Are you using a different camera/deck to capture this time than you used the last time?

  • How do I get my code changes to show when published in Business Catalyst?

    I have created my website using !Adobe Muse and have used the Ecwid ecomm widget to integrate a shop. As I wasn't happy with the font, colour, etc, I changed the code using the edit 'html' function, accessing the code information from a design browser mode and then further on in the process, I published it to Business Catalyst. However, now the changes don't show. How do I get my code changes to show when published in Business Catalyst? Do I need to go through the same process using Business Catalyst?

    Hi,
    Thank you for choosing Ecwid! To change the design of your storefront, you should go to Ecwid Control Panel > Settings > Design > CSS Themes. Find your current active theme and add all the necessary changes in a big input field that you’ll see there. To know more about how to improve your storefront design, please refer to this article http://help.ecwid.com/customer/portal/articles/1083332-how-to-change-ecwid-design
    If you make changes to your CSS Theme but your storefront design remains the same, please refer to this article http://help.ecwid.com/customer/portal/articles/1149625-i-don-t-see-the-changes-i-made-to-m y-css-theme
    Also, you can find a good range of articles and tips on how to improve your Ecwid store in our Help Center http://help.ecwid.com/ Feel free to use it!
    If you get any other questions about CSS or Ecwid functionality, contact us on our forum http://www.ecwid.com/forums/  There we will be able to check your website and provide more specific solutions for you.

  • VAT code change in NL on 1-JAN-2001

    The highest VAT code changes from 18 to 19% in the Netherlands on the first of January. We have put all you need to do in a short checklist in Dutch below.
    BTW hoog wordt 19% in 2001
    CONSEQUENTIES IN ORACLE FINANCIALS
    Per 1 januari 2001 aanstaande verandert het BTW percentage
    voor het hoge tarief van 17,5 % naar 19%. De consequenties
    daarvan voor het gebruik van Oracle Financials zijn niet
    schokkend of omvangrijk te noemen, maar wij zetten ze toch
    graag voor u even op een rij.
    AANDACHTSPUNTEN
    * Zowel voor Accounts Payables als voor Accounts Receivables
    dient een nieuwe TAX-code met 19% BTW gecreC+erd te worden.
    Ook de system options voor de verwerking van TAX informatie
    van deze beide Oracle modules moeten op deze wijziging
    aangepast worden.
    * Afhankelijk van de werkwijze en periode indeling kan het
    raadzaam zijn om de huidige TAX-code voor de 17,5% BTW een
    einddatum voor de geldigheid mee te geven.
    * De verschillende medewerkers van de Crediteuren en
    Debiteuren moeten geC/nstrueerd worden over het juiste
    gebruik van de BTW-codes. Zeker voor de periode van de
    afsluiting van het boekjaar, is het aan te bevelen daar
    heel duidelijke afspraken en procedures voor op te stellen.
    * Verwijzingen vanuit bijvoorbeeld artikelen, vaste
    gegevens Debiteuren en Crediteuren, naar de BTW-code voor
    het hoge percentage moeten gemuteerd worden. Ook bij deze
    actie spelen duidelijke afspraken over het moment waarop
    het een en ander uitgevoerd wordt, een belangrijke rol voor
    de procedure voor de dagelijkse administratieve werkzaamheden
    tijdens de periode van de jaarafsluiting.
    STAPPENPLAN
    voor het invoeren van de gewijzigde BTW code:
    1.
    CreC+er de nieuwe BTW code in zowel AP als in AR.
    Zet de datum geldig vanaf op 01-JAN-2001.
    2.
    Zet de datum geldig tot en met van de 'oude' BTW codes in
    AP en AR voor 17,5 % BTW op 31-DEC-2000.
    3.
    Bepaal een strategie voor de periode dat beide boekjaren
    nog open staan voor mutaties. In deze periode verschuift
    het zwaartepunt van de mutaties van het oude naar het nieuwe
    boekjaar. Afhankelijk van het moment van deze omslag dienen
    ook de System Options van beide modules met betrekking tot
    de BTW codes aangepast worden, indien in de parameters een
    vaste code is opgenomen.
    4.
    Pas hierna de eventueel op Supplier site en Customer address
    niveau opgenomen BTW codes aan.
    N.B.
    Let in deze periode bijzonder goed op de mutatiedatum.
    Afhankelijk van deze datum is de oude of de nieuwe BTW code
    geldig !
    Oracle Consulting
    Nederland
    null

    The table for tax code is T076M - maintainable using T code OBCD.  For EDI file number, execute T Code WE02 - enter IDoc number and execute (F8). In the right window pane, choose select layout -> change layout and pick up the field Interchange file reference. Guess this is what you are looking for.
    OR
    Go to transaction WE02 or WE05 enter Idoc number and choose execute. When Idoc data is displayed double click on Control Record in left pane. Choose Details tab. Interchangable file under References.
    You can also refer the entries in table EDIDC.
    Reference to interchange file:
    This field contains the reference number of the interchange file in which the EDI message was transmitted.

  • Tax code change validation

    Hi experts,
                     My client has following requirement :
    once the GR is done then tax code change should not be allowed in ME22N (for all doc. types) ie it should be greyed out. pls guide me on the same.
    they also want to incorporate the same for Scheduling Agrement.
    Regards

    Hi,
    Restrict the field MWSKZ with  authorization object  for t.code ME21N/ME22N
    or else
    Try it using transaction screen variant using SHD0
    BR,
    Patil

  • Code changes in Production system.

    Hi all,
    Due to the unavailability of the development and quality i want make code changes in production system.
    Please tell me is this possible and also i want know that does it effect or not?
    Regards,
    Ramprasd

    Hi,
    For editing in PRD system, u need to get authorization for editing. To get auth object, contact basis.
    But proper way to edit a code is modifying in DEV, then transport it to QAS & PRD.
    Regards,
    Prem

  • Upgrade from JDK 1.2.2 to JDK 1.4.2. Any code changes required?

    Hi,
    We are in the processes of upgrading the JDK versions on servers to JDK 1.4.2 to support other software upgrades.
    The JDK versions on each of the servers are at different versions. On one of the servers, the version of JDK is currently at JDK 1.2.2_10. Can somebody please advise me if there would be any code changes required to support this upgrade (such as some methods being depreciated)?
    We are also evaluating if we need to upgrade to JDK 1.4.5. In such a case, would there be any code changes required to upgrade from JDK 1.4.1_x to JDK 1.4.5. I assume there wouldn't be any changes for this minor upgrade but just want to confirm.
    I would really appreciate an early reply.
    Thanks in advance.
    Regards,
    Vamshi

    "1.4.5" - you meant "1.5" ? :)
    About deprecations -- you will be warned by the compiler. E.g. "assert", "enum" are keywords and cannot be used as method names.
    The rest depends on your application. The more complex it is, the more differences can be encountered. You certainly need to run a test cycle for it with the new platform.
    From my experience, I can list some issues that I have read about or have experienced myself:
    1) serialization: the algorithm used to calculate the serialVersionUID had some changes between Java versions, due to compiler-added extra methods.
    If you don't have serialized instances, or your serialVersionUID is specified explicitly, you are safe.
    2) class loading order can be different in different platforms
    Once ago I have seen a paper from BEA Systems highlighting some open topics that can arise when migrating between different vendor's JVMs. Probably, it is the one:
    http://edocs.bea.com/jrockit/geninfo/devapps/codeprac.html
    In my friend's case, there was some class-initialization logic, that behaved differently when class loading order changed.
    3) Swing applications can sometimes behave slightly different.
    E.g., I observed some changes in focus handling, although minor ones. Fixed with several lines of code.
    4) Some libraries can depend on particular J2SE version. E.g. J2EE ones.
    E.g. I was not able to run J2EE 1.4 thick client application with JRE 1.5. The j2ee library used by the app either had some dependencies on sun.* classes, or on some protocols (not sure, I don't remember it well).
    5) Regression bugs are sometimes encountered. I.e. something that worked, does not work now.
    Summary: You need testing.

  • Web Dynpro Java code changes

    Hi,
    I need to put some validations in web dynpro java page which is "employee address page". I checked the BADI's but no badi exists which serve my purpsoe.
    Now I want to make the code change in web dynpro java. Pls answer the followng questions.
    1- I have installed NWDS on my local machine. Do i need to install NWDI also?
    2- How to import and export the required page and from where?
    3- How to modify the standard code, I mean in ECC we have enhancement and modification concept.
    Thanks,

    NWDI is a part of NWDS, So you would need both as mentioend
    NWDI - Netweaver Development Infrastructure is an SAP sytem for java development & change management. It's a repository for java code and change management system.
    NWDS is a developer tool to build applications similar to Eclipse. NWDS uses NWDI to check-in & check-out java code and move java changes to SAP runtime systems (like portal etc).
    Read the basics of NWDI and its utility in the below help document
    http://help.sap.com/saphelp_nwce72/helpdata/en/48/bc23b1a70a0611e10000000a42189b/frameset.htm
    Also go through how to import ESS configurations in NWDI
    ESS/MSS Customization – Make it Simple
    NWDI cookbook in SAP note : 872892
    The specified item was not found.
    Edited by: Siddharth Rajora on Nov 9, 2011 9:28 PM

  • Workshop 8.1 detect source code changes

    Hi,
    I'm working on a web service application using Workshop 8.1sp4. When I run my web application in debug mode, the server will only detect Java source code changes within the webapps (WEB-INF/src). If I move the source code outside the webapp and into a seperate java project folder (still the same Workshop application), Weblogic will not detect changes. Is there any way to get this to work?
    Thanks,

    Hi
    I tested the scenario on 8.1Sp4 and could replicate the issue. This looks like a bug.
    Could you please open a BEA support case to get a fix? You could open a support case either at http://support.bea.com or by calling 1-888-232-7878
    I could get it working only after I clean and build the java project followed by the web project, then the web project recognizes the changes in the java project.
    The web project should be built after the java project, if the order changes it does not work.
    Vimala-

Maybe you are looking for

  • How to show a message in a query BI7?

    Hi everybody, In BI7, I need to show an error message that the selection screen of a query to after checking a variable. I tried the following in the code of customer exit for variables (step 3): 1. Put "MESSAGE E899(bd) WITH text-008" but after show

  • How to add value in standard table

    Hi i need to add one field in standard table VBAK  so i have added one field ( for eg i have added  status as field in VBAK ) in that standard table through append structure than i used one user exit USEREXIT_SAVE_DOCUMENT_PREPARE in program MV45AFZZ

  • 400+ Gb aperture 3 library 200 (!) hours to transfer?

    Hi, I have a 400+GB aperture library on an USB2 external h-d. Have tried to move to another larger external h-d but the estimated time for transfer kept escalating. I gave up when the estimate got over 200 hours! Can I try breaking the library into s

  • How to post via email (like with Wordpress)?

    Hi, Hopefully this isn't a silly newby question, I have been scouring the web looking for answers without any luck. I would like to be able to automatically post the contents of emails in chronological order on my website - ie. when I email something

  • OrainstRoot.sh not present in /tmp directory

    I am getting the message run /tmp/orainstRoot.sh as root before proceeding. However I cannot find the orainstRoot.sh file in the /tmp directory. This occurs after I select the UNIX Group Name in the OUI. Can anyone help?