SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Aug 2002
    Location
    calgary, AB, Canada
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    call oracle database procedure in silkTest

    I'm a new silkTest user. I'm testing the java stand alone application for oracle database. I have written some PL_SQL procedures in oracle database. Is there a way I can call these procedures from SilkTest?

    I'd appreciate your help!

    Rita Tan
    QA Engineer
    Autodesk Inc.

  2. #2
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: call oracle database procedure in silkTest

    A good starting point is to check out the DB_ functions from the Online Help. You may want to check out the SYS_ functions.
    If you use any kind of utility/tool to work with your procedures, you can create windows declarations for this tool/utility and use them in SilkTest.

    ------------------

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Location
    calgary, AB, Canada
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: call oracle database procedure in silkTest

    When I use DB_Connect to connect to the oracle database, I got the error massage:

    *** Error: (IM002) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    I have set up my ODBC for oracle database as follow:
    Data Source Name: colmare_f
    User Name: colmare_f
    Server: DSN=CAMARO; SERVER=144.111.195.71; PWD=colmare_f;UID=colmare_f

    and I have following statement in my silkTest script:
    hdbc = DB_Connect ("DSN=colmare_f;UID=colmare_f")

    I am wandering whether the DB_Connect connects the database through the ODBC or I need directly give the oracle connecting string in DB_Connect()?

    Thanks for your help!

    Rita Tan

  4. #4
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: call oracle database procedure in silkTest

    Rita,

    You can, for example, use:
    STRING sConnectString = "DSN={sDSN};UID={sUserID};PWD={sPassword}"
    then in your test script do:
    hdbc = DB_Connect (sConnectString)

    Just make sure your ODBC configuration is pointing to the correct Driver, either Oracle or Microsoft. Also check your entry for Service Name to make sure this points to your dbalias.


    ------------------

  5. #5
    Junior Member
    Join Date
    Aug 2002
    Location
    calgary, AB, Canada
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: call oracle database procedure in silkTest

    Hi Gilbert
    Thanks for your help!
    I figure out my connection problem by using oracle ODBC:
    Data Source Name: myconnection
    Service Name: camaro
    UserID: colmare_f

    My silkTest has following statement:
    hdbc = DB_Connect ("dsn=myconnection;uid=colmare_f;pwd=colmare_f" )

    I also use "hstmnt = DB_ExecuteSql (hdbc,"begin testSilk(); COMMIT; end;")" to call a stored procedure. I just wonder if there is a way to call stored function and get the returned value from silkTest?

    Thanks!

    ------------------


    [This message has been edited by tanx (edited 08-15-2002).]

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: call oracle database procedure in silkTest

    try using DBFetchNext to get the data from a stored procedure call.

    ------------------
    Sree
    Sree

  7. #7
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: call oracle database procedure in silkTest

    Rita,

    Now you're turning into Wonder Woman
    (i wonder, i wonder)
    Question is: How do you call your stored function and get the returned value outside of SilkTest?
    Then, maybe I can help you out after that.



    ------------------

  8. #8
    Junior Member
    Join Date
    Aug 2002
    Location
    calgary, AB, Canada
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: call oracle database procedure in silkTest

    Hi All,
    Thanks for replying-I appreciate it!

    Maybe I need to clear my question,
    In my procedure I did a bunch of things and finally I use "dbms_output.put_line()" to print "test pass" or "test fail". Since this statement won't work when you call procedure from silkTest, How can I pass this kind of info from procedure? or Can we call function which can return some value to silkTest?

    Thanks again!

    Rita

    ------------------


    [This message has been edited by tanx (edited 08-15-2002).]

    [This message has been edited by tanx (edited 08-15-2002).]

  9. #9
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: call oracle database procedure in silkTest

    The DB_ functions are it! (in SilkTest)
    If none of those functions are doing what you want to do and if you are doing your stuffs in SQL*Plus, for example, you'll have to make SilkTest work with SQL*Plus (preferrably the windows version). If you use another 3rd party tool like TOAD or PL/SQL Developer, you'll need to do the same thing (Record windows declarations for the tool and so on then let SilkTest grab the values you needed from that tool).
    Hope that helps.


    ------------------

  10. #10
    Junior Member
    Join Date
    Aug 2002
    Location
    calgary, AB, Canada
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: call oracle database procedure in silkTest

    Hi Gillbert

    I use silkTest 5.5 and I couldn't find the DB_functions in help file or in library Browser. Could you please tell me the syntax about this function?

    Cheers,

    Rita

    ------------------

 

 
Page 1 of 2 12 LastLast

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 10:44 AM.

Copyright BetaSoft Inc.