Instead of passing the connection object to action, u can use the object in
the action to perform database operation..

Create a function in function library which will return ADODB object and use
it in action so that only one object can be used across the actions.

On Fri, Nov 20, 2009 at 2:52 AM, lsnelsen <[email protected]> wrote:

> I want to be able to create a Connection object once, and use many
> times in more than one ACTION.
>
> E.G.
>  ------------------pseudo code
> -------------------------------------------
>  set oCon=CreateObject("ADODB.Connection")
>  while not end of file
>    GetInput ( inputrow )
>    RUNACTION Action1 oneiteration oCon , inputrow
>    RUNACTION Action2 oneiteration oCon , inputrow
>    RUNACTION Action3 oneiteration oCon , inputrow
>  end while
>  -----------------pseudo code
> -------------------------------------------
>
>  Each Action could be a test against an input row
>  E.G.   Action1:  CreateOrder
>            Action2:  ChangeOrder
>            Action3:  ProcessOrder
>            Action4:  CancelOrder
>            Action5:  DenyOrder
>
> I know I can not pass objects to Actions as parameters or Environment
> Variables.
> I know I do not want to create a new connection for each action and
> each iteration.
>
> Is there a way to create a VB object which could contain a connection
> object which could be referenced by an Action?.
>
> Is there a singleton class which is persistant?
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to