Reuse parameters in variables

Hi, please can someone help me with this as I have been
searching the forums for over an hour.
There is some indication that the code Dreamweaver creates
does not allow more than one recordset to use the same variable
parameter, ie a URL parameter in both recordset queries.
Can someone please help with how I can manually adjust the
code so that it works?
This is what I have so far for one recordset, which bit do I
change?
quote:
<%
Dim RSsepcsubdetail
Dim RSsepcsubdetail_cmd
Dim RSsepcsubdetail_numRows
Set RSsepcsubdetail_cmd = Server.CreateObject
("ADODB.Command")
RSsepcsubdetail_cmd.ActiveConnection =
MM_conn_vb_pureinfo_STRING
RSsepcsubdetail_cmd.CommandText = "SELECT * FROM specs_detail
WHERE prod_code = ?"
RSsepcsubdetail_cmd.Prepared = true
RSsepcsubdetail_cmd.Parameters.Append
RSsepcsubdetail_cmd.CreateParameter("param1", 200, 1, 255,
RSsepcsubdetail__MMColParam2) ' adVarChar
Set RSsepcsubdetail = RSsepcsubdetail_cmd.Execute
RSsepcsubdetail_numRows = 0
%>
As you can see, this recordset only has one parameter
variable, but my next recordset, on the same page, has the same
recordset variable.

[email protected] wrote:
> Ok, but in my webpage, I have the url for the page,
ending in;
>
> admin_specs_2.asp?prod_code=LK-049
>
> I want the value, LK-049 to be available for more than 1
recordset on the
> page, it just wont work.
At the top of your page (code view) use this:
<%
Dim ParamProdCode
ParamProdCode = Request.QueryString("prod_code")
%>
Then in your recordset where it asks for value, just put
ParamProdCode.
Dooza
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html

Similar Messages

  • Basics of Parameters and Variables

    Dear All,
    I would like to learn how to use parameters and variables in Custom Functions, in SAP BODS.
    Could anyone please send me good links.
    Thanks,
    Bheem.

    Hi Bheem,
    SAP BODS Designer guide is best tutorial for Parameters and Variables.
    Regards,
    Balakrishna

  • Obtaining custom HTTP GET / POST parameters of variable length in Application Process

    Hi, I'm trying to connect a javascript UI control within my page to an APEX Application Process.
    The control calls the application process via AJAX and appends a variable number of GET / POST parameters to its URL.
    What is the best way to obtain these parameters from within the PLSQL procedure of the process? Or is there a better way to connect my javascript AJAX control to the Database behind my APEX app?
    Thanks,
    Steffi

    Steffi,
    I'm using APEX 4.1 and I've not used Treegrid before. It does look pretty interesting.
    Firstly, I'm not sure if you are aware but GET requests aren't as secure as POST requests. GET simply appends a key/value pair to the server as part of the url which can be easily sniffed. POST request on the other hand sends the data as key/value pairs to the server in the header which makes it harder to intercept.  This is why APEX outputs forms with POST methods.
    Secondly, back to your original question.I'm not sure this is possible with an Application Process. In the passed I've used POST methods to pass values to my Application Process. I have some code using native jQuery if you would like to see how its done. Alternatively, if you convert your application process to a standard pl/sql procedure (i.e SQL Workshop>Object Browser>Procedures) you can call this procedure and pass in values as you would with any PHP page.
    Simple example (untested)
    CREATE OR REPLACE PROCEDURE  "foo" ( my_name varchar(20)  
         , count NUMBER)
    IS  
         p_name varchar(20) := my_name;
         p_count NUMBER     := count;
    BEGIN
    --Do what you want
    --output something
       htp.p(p_count || '.: '|| p_name);
    END;
    The url on the page (or ajax call) would be something like "/pls/apex/{MY SCHEMA}.foo?my_name=Alistair&count=1"
    Of course for text you will need to escape single colons and special characters etc.
    I would really like to help you further so if you could create a working demo using a free workspace on http://www.apex.oracle.com and provide me with demo username/password. I can try and have a better look for you.
    In all honesty, I'm sure you would be looking to create this as a plugin so that you can easily reuse it in various parts of your application and can easily update it or maintain it. I can help you with that as well if you want.
    Alistair
    P.S You might want to update your profile on this forum to provide your name so people dont just see "31742965-2d09-4f42-849f-e39eb2cfbc9e" your profile name

  • Communicate large number of parameters and variables between Verstand and Labview Model

    We have a dyno setup with a PXI-E chassis running Veristand 2014 and Inertia 2014. In order to enhance capabilities and timing of Veristand, I would like to use Labview models to perform tasks not possible by Veristand and Inertia. An example of this is to determine the maximum of a large number of thermocouples. Veristand has a compare funtion, but it compares only two values at a time. This makes for some lengthy and inflexible programming. Labview, on the other hand, has a function which aloows one to get the maximum of elements in an array in a single step. To use Labview I need to "send" the 50 or so thermocouples to the Labview model. In addition to the variables which need to be communicated between Veristand and Labview, I also need to present Labview with the threshold and confguration parameters. From the forums and user manuaIs understand that one has to use the connector pane in Labview and mapping in Veristand System Explorer to expose the inports and outports. The problem is that the Labview connector pane is limited to 27 I/O. How do I overcome that limitation?
    BTW. I am fairly new to Labview and Versitand.
    Thank you.
    Richard
    Solved!
    Go to Solution.

    @Jarrod:
    Thank you for the help. I created a simple test model and now understand how I can use clusters for a large number of variables. Regarding the mapping process: Can one map a folder of user channels to a cluster (one-step mapping)? Alternatively, I understand one can import a mapping (text) file in System Explorer. Is this import partial or does it replace all the mapping? The reason I am asking is that, if it is partial, then I can have separate mapping files for different configurations and my final mapping can be a combination of imported mapping files.
    @SteveK:
    Thank you for the hint on using a Custom Device. I understand that the Custom Device will be much more powerful and can be more generic. The problem at this stage is that my limitations in programming in Labview is far gretater than Labview models' limitations in Veristand. I'll definitely consider the Custom Device route once I am more provicient with LabView. Hopefully I'll be able to re-use some of the VI's I created for the LabView models.
    Thanks
    Richard

  • Calling a function and passing parameters via Variables

    I've got an XML file that is loading in data and is calling functions.
    I've figured out how to call the methods from classes with variables set from the XML file:
    var functionToCall:String = xml.functions.func[0].to_fire.toString();
    myClass[functionToCall]();
    This calls the function perfectly.
    I was wondering if there is anyway to pass parameters into the function as well through variables.  Some functions may have no parameters, some functions could have 5... so the xml could be like this:
    <functions>
       <func>
        <to_fire>function1</to_fire>
        <param>
         <value>true</value>
         <type>Boolean</type> <!-- Must be set to Boolean, String or Number -->
        </param>
       </func>
       <func>
        <to_fire>function2</to_fire>
        <param/>
       </func>
       <func>
        <to_fire>function3</to_fire>
        <param>
         <value>false</value>
         <type>Boolean</type> <!-- Must be set to Boolean, String or Number -->
        </param>
        <param>
         <value>My String Value</value>
         <type>String</type> <!-- Must be set to Boolean, String or Number -->
        </param>
        <param>
         <value>10</value>
         <type>Number</type> <!-- Must be set to Boolean, String or Number -->
        </param>
       </func>
    </functions>
    whats the best way to set something like this up?

    how would I set something like that up?
    in the class:
    public function myFunction(_param1:String, _param2:Number):void {
    then to call it, would ParamTypes be cast as an array or object or something?
    var functionVariable:String = "myFunction";
    myClass[functionVariable](??);
    Or do I structure the XML file in some way to pass in the information?

  • Setting Application Set Parameters For Variable

    Hi Guys,
    When I've read the BPC help about "Setting application set parameters" and the statement likes this : 
    Allows you to define a custom email message that is sent when a work status code is changed. The message is applicable to all applications in the application set. You can customize the message using the following variables:
    %USER% - name of user who changed the status
    %ED% - Entity dimension
    %EM% - Entity member
    %CD% - Category dimension
    %CM% - Category member
    %TD% - Time dimension
    %TM% - Time member
    %STA% - Work status
    %OWNER% - Entity owner
    %TIME% - time of change
    For example, you can enter "This is to inform you that %USER% has updated the work status for %EM%, %CM%, %TM% on %TIME%". The message can be up to 255 characters, and there is no need for quotes or brackets around parameters.
    The Questions:
    When I put the "%ED" into the textfield "APPROVALSTATUSMSG", after that I try to send email from BPF and the "%ED" still same into the email message. But it should describe the value of variable.
    Could you help me how to view the value of variable ?
    Thanks,

    If I look at the available parameters in the helpfile 2 things are strange in my opinion:
    1)the parameter is called approvalstatusmsg, approval status was the V4 naming convention of the function, right now it is called workstatus, so it might be a V4 function. Never used it myself but maybe it is something not correctly migrated to v5.
    2) Even if it is working in V5, which I don't know for sure, then it is strange that you only have variables for Categroy, time and entity, since you can setup the workstatus for more then these 3 dimensions in V5 which you would also like to have in a case you set it up for more then 3 dimensions. For example for if you want to use Category,time,Entity & Product dimension in the workstatus, you would also like to inform the people which product is updated, since only just category,time and entity won't say that much.
    So I think you best check with support if this function is still usable in V5 or if it is an old function from V4. and if it is working in V5, how do you get the right parameters in the variables when you setup workstatus for other dimensions then just Category/time/Entity.
    I would like to know the results!
    Joost

  • Is it possible to use parameters as variables in templates?

    Hi there,
    When you see a statement like the following in your template:
    <$defaultPageTitle=lc("wwNgEditFolder")$>
    Is there any way to replace lc("wwNgEditFolder") for something more dynamic? For instance, if I replaced the above with something like this:
    <$defaultPageTitle=myURLVariable$>
    and then use the url as follows:
    .../idc/idcplg?IdcService=MY_SERVICE&myURLVariable=mytitle
    Would that work? or what else can I do to dynamically give values to my page.
    Thanks!

    Any parameter you pass to a Service in the QueryString will be available to you as a variable in the template.

  • Bind Variable reuse in GROUP BY queries

    We have several queries that are rather large (in are opinion, that is) and they each have 10 '?' place holders for binding JDBC parameters. These queries also use bind variables in the WHERE and GROUP BY clauses. Eventhough there are 10 bind variable place holders ('?'), there are only 3 distinct values needed.
    So...in TOAD or SQL*Plus, we run the queries and "reuse" the same three bind variables and the query works fine. If we use 10 different bind variables, filled with the 3 values, we get a an error, "not a GROUP BY expression."
    We would like to make these calls as JDBC PreparedStatements and bind the parameters at run time, so that we could take advantage of the statement cache and increase performance. But...since JDBC parameter binding seems to be positional, we seem to be getting 10 different bind variables at runtime in the PreparedStatement call. Is there a way to "reuse" the bind variables that JDBC is binding at runtime?
    Regards,

    Yep...that is what we are doing. We have a work around that is to manually replace the ? with string data and then pass the query in complete. It will work fine for us. I was just checking the alternatives. The query is large, but the offending code is:
    ...( select distinct T3.ptcpt_cd,trunc(new_time(T1.start_dt_gmt, 'GMT', ?)) trade_date,
    sum(decode(T1.sttl_item_num, 10, T1.sttl_item_qnty, 0)) DA_CHARGE_MW,
    sum(decode(T1.sttl_item_num, 10, T1.sttl_item_amt, 0)) DA_CHARGE_AMT,
    sum(decode(T1.sttl_item_num, 30, T1.sttl_item_qnty, 0)) BAL_CHARGE_MW,
    sum(decode(T1.sttl_item_num, 30, T1.sttl_item_amt, 0)) BAL_CHARGE_AMT,
    sum(decode(T1.sttl_item_num, 20, T1.sttl_item_qnty, 0)) DA_CREDIT_MW,
    sum(decode(T1.sttl_item_num, 20, T1.sttl_item_amt, 0)) DA_CREDIT_AMT,
    sum(decode(T1.sttl_item_num, 40, T1.sttl_item_qnty, 0)) BAL_CREDIT_MW,
    sum(decode(T1.sttl_item_num, 40, T1.sttl_item_amt, 0)) BAL_CREDIT_AMT,
    T3.source_cd Source
    from nm_sttl_item_dtl T1, nm_settlement T2, nm_sttl_statement T3
    where trunc(new_time(T1.start_dt_gmt, 'GMT', ?)) between to_date(?,'mm/dd/rrrr') and to_date(?,'mm/dd/rrrr')
    and sttl_item_num in (10, 20, 30, 40)
    and (sttl_item_qnty <> 0 and sttl_item_amt <> 0)
    and T1.sttl_id = T2.sttl_id
    and T2.statement_id = T3.statement_id
    and T3.ptcpt_cd = 'FAC'
    and T3.source_cd = AREA'
    group by T3.ptcpt_cd,trunc(new_time(T1.start_dt_gmt, 'GMT', ?)), T3.source_cd)...

  • Variable reuse with different sql clauses

    Hi There,
    Is it possible to reuse the same variable with different sql queries in packages....
    Example:
    i have a variable say
    1)variable name: filename
    2)query in variable: select 'emp.txt' from dual
    so using this variable name in data store, i am passing file name dynamically, but i need to change the file name emp.txt to dept.txt if emp.txt feed is missing.
    One solution from my side is using one dump table having file name. any more without using db tables
    please share views
    Cheers,
    Surya

    Hi Bhabani,
    Thanks for your prompt reply, it was really helpful....
    for suppose in i have feed name like dept.20110325, consider as sysdate.
    so i need to pass feed name like above format...
    As of my understanding from your reply, in third step we can give only string like 'emp1.txt', is not possible to write query like in assign mode: select 'dept'||to_char(sysdate,'yyyymmdd') from dual
    Cheers,
    Surya

  • Varying result set and binding parameters in sqlcmd from variable

    SSIS  - Support of Multiple versions of our product
    Our Enterprise Data warehouse consolidates data from multiple data sources.  We have a requirement that we should be able to support data collection from different version of these data sources at the same time.
    Ex. Customer has three different versions of our product installed 7.3,  7.3.1 and 7.3.2. The data warehouse would in this case would be on version 7.3.2, but should be able to collect data from prior versions of the data sources.
    We use stored procedures to collect data from sources into our staging area and then we transform and load it on to the warehouse. The design of SSIS packages are that, there is one main package that executes packages for each table that we collect data
    from the source. The main package is invoked per source that we need to collect data from, if there are three sources at run time there will be three instances of the main package running. These packages run on the warehouse machine to pull the data from the
    source system.
    We would like to maintain one version of these packages on the warehouse and support collecting data from different source versions.
    Challenges
    The signature of stored procedures on the source system has changed between versions
    There are some additional fields returned by these stored procedures in the newer release
     Example
     7.3 version signature :
    [dbo].[PDW_GetMediaAgentSummary](@LastVersionID
    AS BIGINT,
    @InitializeDays as
    INT = 60,
    @NextVersionID AS
    BIGINT OUTPUT)
    7.3 Sp1 version signature:  [dbo].[PDW_GetMediaAgentSummary](@LastVersionID
    AS BIGINT,
    @DataStartDate AS
    DateTime2(3),
    @NextVersionID AS
    BIGINT OUTPUT)
     Also, let us say in 7.3 this stored procedure returned 8 fields and 7.3 sp1 it is returning 10 fields.
    The way we are trying to accommodate is to use “SQLCmd from variable” option in the OLE DB source to cover the signature difference, but this option does not allow us to bind parameters
    to variables to get the output value. The second issue of additional fields (or the lack of additional fields from the 7.3 procedure), we tried to turned off the metadata validation, but we get field not found error at run time when we run the SSIS package
    against 7.3 version. Looks like the only way we could solve is to duplicate the data flow tasks, based on the source version. Looking for better way to do this, since this could go out of control as the number of releases increases.
    Appreciate help on this.

    I suggest you branch your package into one route vs another based on some flag that indicates version the package is connected to then it will execute one stored proc or another, this can be done
    using the Precedence Constraints, or make a wrapper stored proc that hides the data differences between the versions.
    Arthur
    MyBlog
    Twitter

  • What are mapping variables & parameters ?

    1.In real time scenario where can we use mapping parameters and variables?
    2.what are mapping variables & parameters ?

    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10577/d_xplan.htm#CACICEDJ]
    BPS@xe>explain plan for
      2  select sysdate from dual;
    Explained.
    BPS@xe>select * from table(dbms_xplan.display());
    Plan hash value: 1388734953
    | Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
    8 rows selected.
    BPS@xe>select * from table(dbms_xplan.display('PLAN_TABLE',null,'BASIC'));
    Plan hash value: 1388734953
    | Id  | Operation        | Name |
    |   0 | SELECT STATEMENT |      |
    |   1 |  FAST DUAL       |      |
    8 rows selected.

  • Package variables vs procedure arguments

    Is it better to use package-level variables inside package or to use procedure arguments?
    I'm just asking because I have a bunch of parameters for each procedure (all of them are private, and are only called from within the package).
    Is better this:
    package a
    is
    --package variable
    v_something my_table%rowtype;
    procedure a
    is
    --do something with v_something
    end;
    procedure b
    is
    select * into v_something
    from my_table
    where rownum=1;
    --call it without parameters
    a;
    end;
    end;
    or this:
    package a
    is
    procedure a(inSomething my_table%rowtype)
    is
    --do something with v_something
    end;
    procedure b
    v_something my_table%rowtype;
    is
    select * into v_something
    from my_table
    where rownum=1;
    --call it with parameters
    a(v_something);
    end;
    end;

    Please post between the tags
    ..... and {code }
    If you have multiple procedures updating and reusing the package variable you loose track of what value you have in the package variable.
    And it depends what you are trying to do.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to use one Assign action to create multiple context variables

    Hello, everyone.
    I read some tips from Oracle documentation that said:
    Avoid creating many OSB context variables that are used just once within another XQuery
    Context variables created using an Assign action are converted to XmlBeans and then reverted to the native XQuery format for the next XQuery. Multiple "Assign" actions can be collapsed into a single Assign action using a FLWOR expression. Intermediate values can be created using "let" statements. Avoiding redundant context variable creation eliminates overheads associated with internal data format conversions. This benefit has to be balanced against visibility of the code and reuse of the variables.
    Oracle® Fusion Middleware Performance and Tuning Guide
    +11g Release 1 (11.1.1)+
    Part Number E10108-03
    But I don't know how to do that. Can you show me ?
    Thank in advance
    Edited by: Doubt_Man on Aug 17, 2011 3:30 PM

    if you return sequences, you can declare the return type of your xquery as xs:double*
    (notice the asterix at the end)
    but I have the impression that in the assign action only the first element will be assigned to the context variable
    (correct me if I am wrong)
    So in fact you might indeed have to transform the sequence into a element()*, or concatenate it into a CVS string - for instance using string-join
    http://www.xqueryfunctions.com/xq/fn_string-join.html

  • FileName using Variable Substitution Method

    Hi SAP experts,
    I need some advise regarding this.
    I have here sample structure of message,
    DT_Root  --> root node
      Tree  --> occurence is 1 to unbounded
        SubTree1
        SubTree2
        SubTree3
    What will be my File Content Conversion parameters to be set in Variable Substitution Method in order for me to get the value of SubTree3 and make it as my filename?
    Also, the value of SubTree3 must not be present on my actual payload..
    var1:payload,1,SLI,1   ---?? what if it is unbounded?
    Kindly advise.
    Thank you very much.

    Hi Raj,
    I cannot open the link.
    Anyway, is it ok if you will advise me regarding my question a while ago?
    I have here sample message structure,
    CSV --> Message Type
    SLI  --> 1 .. unbounded (occurence)
      subSLI1
      subSLI2
      subSLI3
    FileNode --> 1..1 (occurence)
      FileName --> 1..1
    Here's my parameters in Variable Substituion method,
    FileName Scheme: %var1%.csv
    var1   --  payload:CSV,1,FileNode,1,FileName,1
    File Content Conversion Parameters:
    Recordset Structure: SLI,FileNode
    SLI.addHeaderLine: 3
    SLI.headerLine: PERIO;EAN;ILN,....
    SLI.fieldFixedLengths: 8;10;13;...
    SLI.fixedLengthTooShortHandling: Cut
    SLI.fieldSeparator: ;
    SLI.endSeparator: 'nl'
    FileNode.fieldFixedLengths: 0
    FileNode.fixedLengthTooShortHandling: Cut
    I must the output flatfile with a value of the filename in the FileName field.
    And the content of the flatfile must look like this,'
    PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;%CURRENCY%;STOCK;STOUN;ARTNR;ARKTX
    20071020;737052020198 ;4333342000008;         1;        9.95;W;X;ST ;EUR;0000000000;ST ;                                  
    20071020;737052056852 ;4333342000008;         1;       14.50;W;X;ST ;EUR;0000000000;ST ;                                  
    20071020;737052073552 ;4333342000008;         1;       12.95;W;X;ST ;EUR;0000000000;ST ;                                  
    *each field has a fixed field length.
    Kindly advise if my set parameters are correct.
    Thank you very much!

  • Unable to access process variable value in the DXFA file

    Hi,
    I am using the On-Demand-Assembly solution accelerator to stitch forms. I am trying to access a process variable inside the dxfa file.
    This is the syntax i used: <c:forEach var="templateItem" items="${requestScope.paramsMap.templateList}"> The templateList value is not being fetched. The same code works fine if I hard code the items.
    paramsMap is set as the Parameters Map variable in the invokeODADocument service.
    Any suggestions on what I might be missing here??
    Thanks.
    Regards,
    Vidya

    Vidya Kesavan,
    Just a shot in the dark here, but I think you may have a typo in "requestScropt.paramsMap.templateList" where "paramsMap" should be "paramsmap" in the context of the CSC template. That could be the cause, making it impossible for ODA to find the variable you're referencing. (I believe it's "paramsmap" within the CSC regardless of what name you have the Parameter Map process variable.)
    Stefan
    Adobe Systems

Maybe you are looking for

  • External HD Not Working Yosemite

    After I updated my Macbook Air to Yosemite, my 2T Lacie Porche Design External HD kept ejecting after a minute or so after being plugged in. I tried all the troubleshooting there is to try in this site. I took my macbook to an Apple store with the HD

  • Oracle Fusion Middleware Training Videos & Documents

    Hi All, I am planning to learn Oracle Fusion Middleware. Can any one please share relate videos and documents which is start as a beginner. Thanks, Vas

  • Help ! Connecting Sony TRV14E to a G5

    Quite New to Mac and expected simplicity ! I have Sony TRV14e camcorder and would like to connect it, so I can burn DVD's and hopefully take some pictures off the Film. It does not even recognise it ! What can I do ? Thanks

  • No conection between computer and scanner

    my all in one scan dos't conect to my labtop

  • How to receive RTP data by JMF

    Hello!! I have a ipaq3870 installed Jeode. I can run JMStudio to play media on PDA and receive RTP data from PC's JMStudio. But I can't receive RTP data by AVReceive2. I compressed AVreceive2 into custom.jar. Can anyone teach me how to do? Did my ste