SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    lrd_save_col syntax problem?

    User mutigeroo (mutigeroo@yahoo.com.nospam) posted:

    Hello,
    Here is what I am doing to save a value returned from a sql query.

    lrd_stmt(Csr8, "SELECT \"fldNextEnrollmentNumber\" FROM \"dbo\".\""
    "tblCISNextNumbers\" ", -1, 1, 0, 0);

    lrd_save_col(Csr8,1,1,0,"Saved_fldNextEnrollmentNu mber_D44");
    lrd_fetch(Csr8, 1, 1, 0, PrintRow7, 0);
    lr_output_message
    (lr_eval_string "{Saved_fldNextEnrollmentNumber_D44}"));

    However in the execution log, the output is always
    {Saved_fldNextEnrollmentNumber_D44} instead of the actual value. WHat
    am I doing wrong?
    Thanks in advance.
    -J



  2. #2
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User mutigeroo (mutigeroo@yahoo.com.nospam) posted:

    The data being returned is just a sequence number and it ALWAYS has a
    value.

    I found out that VUgen did not like the
    Saved_fldNextEnrollmentNumber_D44 for parameter name and the script
    works when I used "saved_enroll_id" instead.

    It still wont print out the actual value no matter if I use
    LR_output_message or LR_log_message with or without including
    LR_eval_string and it always prints out {saved_enroll_id} to the log :
    (

    Thanks for trying to help, and I look forward to any further help
    based on my clarification.

    --- In LoadRunner@y..., "Bohner, Jeff" <Jeff.Bohner@T...> wrote:
    sure in your
    things LR :
    possible when
    hitting a
    entry
    recorded
    playing
    WHat http://docs.yahoo.com/info/terms/
    of
    copying,
    If
    destroy all copies.



  3. #3
    Member
    Join Date
    Oct 2001
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User Michael Foley (mfoley@sqmr.com.nospam) posted:

    try this for your output statement instead of
    lr_output_message(lr_eval_string
    "{Saved_fldNextEnrollmentNumber_D44}"));

    try:
    lr_output_message
    ("value is %s ",
    lr_eval_string
    "{Saved_fldNextEnrollmentNumber_D44}"));

    THAT IS %s
    --- mutigeroo <mutigeroo@yahoo.com> wrote:
    lrd_save_col(Csr8,1,1,0,"Saved_fldNextEnrollmentNu mber_D44");


    __________________________________________________

  4. #4
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User mutigeroo (mutigeroo@yahoo.com.nospam) posted:

    Jeff,
    All good points. So here are the things I did.

    1) The database file is not corrupt since I can add records manually
    using the application GUI.

    2) The playback and recording users are the same and I verified this
    from the recording/exec logs (the authentication is bound to my
    domain user account/ windows authentication anyways, and Im doing all
    this from one machine

    3) So I looked into the option of a null value being returned, looked
    in the LR knowledge base and they had this workaround:

    Create a function and using it like this that will replace the value
    witht he string "NULL" in case a null value is returned by
    lr_save_col.

    The function:
    void CheckParam(char *param)
    {
    int rc;

    /* if lr_eval_string on param equals param string
    itself, the value from lrd_save_col is NULL; therefore,
    set parameter to NULL */

    rc = strcmp(param,lr_eval_string(param));
    if (rc == 0)
    lr_save_string("NULL",param);
    }

    My Vugen code now:
    lrd_stmt(Csr8, "SELECT \"fldNextEnrollmentNumber\" FROM
    \"dbo\".\"tblCISNextNumbers\" ", -1, 1, 0, 0);
    lrd_save_col(Csr8,1,1,0,"saved_enroll_id");
    lrd_fetch(Csr8, 1, 1, 0, PrintRow7, 0);
    lrd_close_cursor(&Csr8, 0);
    CheckParam("{saved_enroll_id}");
    lr_log_message("value is %s",lr_eval_string("{saved_enroll_id}"));

    The exec log:
    vuser_init.c(159): lrd_stmt: SELECT "fldNextEnrollmentNumber"
    FROM "dbo"."tblCISNextNumbers"
    vuser_init.c(163): lrd_fetch: 1 row(s) fetched
    value is {saved_enroll_id}

    Im still stuck and this thing is driving me nuts!

    --- In LoadRunner@y..., "Bohner, Jeff" <Jeff.Bohner@T...> wrote:
    playback
    corrupt?
    when either
    trying to
    returned
    extremely
    of
    copying,
    If
    destroy all copies.



  5. #5
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User Bohner, Jeff (Jeff.Bohner@TheHartford.Com.nospam) posted:

    I don't have all the notes in this string ... I don't remember anyone
    suggesting this ... and I'm a little stupid for not suggesting this earlier.
    In the run time settings check all the logging options... this will display
    in the log the value VUGen is thinking it has to insert into the
    parameter... if there is no display ... you have a data issue... or an sql
    issue... if sql issue it is probably a need to coorelate a key.
    This communication, including attachments, is for the exclusive use of
    addressee and may contain proprietary, confidential or privileged
    information. If you are not the intended recipient, any use, copying,
    disclosure, dissemination or distribution is strictly prohibited. If
    you are not the intended recipient, please notify the sender
    immediately by return email and delete this communication and destroy all copies.



  6. #6
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User mutigeroo (mutigeroo@yahoo.com.nospam) posted:

    Thank you so much for the answer! I never thought that logging could
    influence parameter substitution!!

    So anyways, I had to have extended logging enabled and also the
    logging data returned from server enabled - without it it wont work
    even with just "parameter substitution" check. Do not have to
    check "advance trace" though.

    DOes that mean that my vusers will fail during runtime from
    controller if I do not have extended logging enabled? Im already
    getting too few users/machine, with logging im assuming it will
    affect the vuser number/machine further?

    -J


    --- In LoadRunner@y..., "Bohner, Jeff" <Jeff.Bohner@T...> wrote:
    anyone
    earlier.
    display
    or an sql
    of
    copying,
    If
    destroy all copies.



  7. #7
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User mutigeroo (mutigeroo@yahoo.com.nospam) posted:

    I tried that, it still gives me this in the log:
    vuser_init.c(147): lrd_stmt: SELECT "fldNextEnrollmentNumber"
    FROM "dbo"."tblCISNextNumbers"
    vuser_init.c(151): lrd_fetch: 1 row(s) fetched
    value is {saved_enroll_id}

    This is the code in VUGen:
    lrd_save_col(Csr8,1,1,0,"saved_enroll_id");
    lrd_fetch(Csr8, 1, 1, 0, PrintRow7, 0);
    lr_log_message("value is %s",lr_eval_string("{saved_enroll_id}"));
    --- In LoadRunner@y..., Michael Foley <mfoley@s...> wrote:



  8. #8
    Member
    Join Date
    Oct 2001
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User Michael Foley (mfoley@sqmr.com.nospam) posted:

    in general options under the parameterization tab how
    are your left and right brace defined?
    you may need to change to

    or change the braces in the options section.

    regards,
    m.foley

    --- mutigeroo <mutigeroo@yahoo.com> wrote:
    lrd_save_col(Csr8,1,1,0,"Saved_fldNextEnrollmentNu mber_D44"); http://us.click.yahoo.com/V02TTC/PyK...BHAA/nhFolB/TM


    __________________________________________________

  9. #9
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User Bohner, Jeff (Jeff.Bohner@TheHartford.Com.nospam) posted:

    If it isn't displaying how do you know it has a value? Is the playback
    account the same account you recorded on? Is your database/file corrupt?
    The only time in the past when I have encountered this error is when either
    the column was not valued or there was a conversion problem ... trying to
    save a string in a numeric field ... a long in an int... NULL is returned
    because the database had some sort of error ... etc(which is extremely
    unlikely if you let LR create the correlation).


    This communication, including attachments, is for the exclusive use of
    addressee and may contain proprietary, confidential or privileged
    information. If you are not the intended recipient, any use, copying,
    disclosure, dissemination or distribution is strictly prohibited. If
    you are not the intended recipient, please notify the sender
    immediately by return email and delete this communication and destroy all copies.



  10. #10
    Junior Member
    Join Date
    Nov 2001
    Location
    Fremont,California,USA
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lrd_save_col syntax problem?

    User madhu kunnath (kunnathm@yahoo.com.nospam) posted:

    --0-270434673-1023408637=:51304
    Content-Type: text/plain; charset=us-ascii


    From where did you find "lr_review_string " function.
    I think you have to use lr_eval_string before printing it..

    mutigeroo <mutigeroo@yahoo.com> wrote: Hello,
    Here is what I am doing to save a value returned from a sql query.

    lrd_stmt(Csr8, "SELECT \"fldNextEnrollmentNumber\" FROM \"dbo\".\""
    "tblCISNextNumbers\" ", -1, 1, 0, 0);

    lrd_save_col(Csr8,1,1,0,"Saved_fldNextEnrollmentNu mber_D44");
    lrd_fetch(Csr8, 1, 1, 0, PrintRow7, 0);
    lr_output_message
    (lr_eval_string "{Saved_fldNextEnrollmentNumber_D44}"));

    However in the execution log, the output is always
    {Saved_fldNextEnrollmentNumber_D44} instead of the actual value. WHat
    am I doing wrong?
    Thanks in advance.
    -J


    Yahoo! Groups SponsorADVERTISEMENT

    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    ---------------------------------
    madhus

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:10 PM.

Copyright BetaSoft Inc.