The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

ravinder_sethi
Newbie


Reged: 04/14/08
Posts: 4
Re: Call SQL stored procedure from QTP
      04/17/08 01:33 AM

can u quote an example it is still not clear

this is wat i am doing
my procedure returns a true if it is success and false if fails

'Start-Setting Environment Variables
Environment.LoadFromFile "C:\eservices\EnvironmentSettings.xml"

strSettingRow=Environment.Value("SettingRow")

strPortNo=Environment.Value("PortNo")
strSID=Environment.Value("SID")
strHost=Environment.Value("HostName")


'End-Setting Environment Variables
datatable.SetCurrentRow cint(strSettingRow)

strConnectionString = "Driver={Microsoft ODBC for Oracle};CONNECTSTRING=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & trim(strHost) & ")(PORT="& cint(strPortNo) & ")))(CONNECT_DATA=(SID=" & trim(strSID) &")));uid=[userid];pwd=[password];"
'creating Database connection
Dim lConnectionID, rs
Set lConnectionID = CreateObject("ADODB.Connection")
lConnectionID.Open strConnectionString
Set cmd= CreateObject("ADODB.Command")
Set cmd.ActiveConnection = lConnectionID
cmd.CommandType = 4 ' Stored Procedures

' Define the stored procedure's inputs and outputs
' Question marks act as placeholders for each parameter for the
' stored procedure
cmd.CommandText = "{?=call [GETS_LMS_PROGRAM_INIT_PKG.process_init_requests]}"
Set prm = cmd.CreateParameter("RetVal",adBoolean, adParamOutput)
cmd.Parameters.Append prm

cmd.Execute

wait 2

MsgBox RetVal

Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* Call SQL stored procedure from QTP pcombs1 05/25/07 02:29 PM
. * * Re: Call SQL stored procedure from QTP stth10   12/18/07 02:21 AM
. * * Re: Call SQL stored procedure from QTP testingcharu   09/17/10 08:06 PM
. * * Re: Call SQL stored procedure from QTP testingcharu   09/18/10 11:19 PM
. * * Re: Call SQL stored procedure from QTP Tarun LalwaniModerator   09/19/10 12:39 AM
. * * Re: Call SQL stored procedure from QTP testingcharu   09/19/10 04:24 PM
. * * Re: Call SQL stored procedure from QTP testingcharu   09/17/10 08:03 PM
. * * Re: Call SQL stored procedure from QTP srinireddy007   08/12/08 10:51 AM
. * * Re: Call SQL stored procedure from QTP ravinder_sethi   04/16/08 11:39 PM
. * * Re: Call SQL stored procedure from QTP Tarun LalwaniModerator   04/17/08 01:15 AM
. * * Re: Call SQL stored procedure from QTP ravinder_sethi   04/17/08 01:33 AM
. * * Re: Call SQL stored procedure from QTP roope21   04/17/08 06:09 AM
. * * Re: Call SQL stored procedure from QTP ravinder_sethi   04/22/08 10:24 PM
. * * Re: Call SQL stored procedure from QTP roope21   04/23/08 07:40 AM
. * * Re: Call SQL stored procedure from QTP santhib   06/04/08 10:35 PM
. * * Re: Call SQL stored procedure from QTP stth10   06/04/08 10:54 PM
. * * Re: Call SQL stored procedure from QTP santhib   06/04/08 11:38 PM
. * * Re: Call SQL stored procedure from QTP stth10   06/08/08 11:43 PM
. * * Re: Call SQL stored procedure from QTP santhib   07/10/08 04:16 AM
. * * Re: Call SQL stored procedure from QTP Thanish   06/27/12 07:51 AM
. * * Re: Call SQL stored procedure from QTP avinash_sqa_frms   06/27/12 09:08 PM
. * * Re: Call SQL stored procedure from QTP Thanish   06/27/12 11:40 PM
. * * Re: Call SQL stored procedure from QTP qtp_prof   11/03/11 02:24 AM
. * * Re: Call SQL stored procedure from QTP FredMan   11/03/11 06:10 AM
. * * Re: Call SQL stored procedure from QTP rayshorty   07/22/11 06:19 AM
. * * Re: Call SQL stored procedure from QTP rayshorty   07/25/11 08:38 AM
. * * Re: Call SQL stored procedure from QTP AmolBawane123   01/21/09 04:19 AM
. * * Re: Call SQL stored procedure from QTP stth10   08/13/08 12:53 AM
. * * Re: Call SQL stored procedure from QTP stth10   04/17/08 02:02 AM
. * * Re: Call SQL stored procedure from QTP Thanish   06/27/12 11:47 PM
. * * Re: Call SQL stored procedure from QTP Tarun LalwaniModerator   04/17/08 03:46 AM
. * * Re: Call SQL stored procedure from QTP HKP   04/10/08 10:42 AM
. * * Re: Call SQL stored procedure from QTP Adai   03/26/08 11:34 AM
. * * Re: Call SQL stored procedure from QTP pcombs1   05/25/07 02:38 PM
. * * Re: Call SQL stored procedure from QTP ManishBhagwat   06/01/07 05:00 AM
. * * Re: Call SQL stored procedure from QTP Spygeon   04/15/09 05:45 AM
. * * Re: Call SQL stored procedure from QTP Jits   06/01/07 05:44 AM
. * * Re: Call SQL stored procedure from QTP Spygeon   04/16/09 12:13 AM

Extra information
0 registered and 61 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 31537

Rate this thread

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5