Execute a Stored Procedure from a QuickTest Professional (QTP) script
Tags:
Category:
Question ID: 104034
1
0

Is there a way to Execute a Stored Procedure from a QuickTest Professional (QTP) script?

Marked as spam
Posted by (Questions: 4, Answers: 0)
Asked on February 5, 2010 6:51 pm
23 views
Answers (1)
2
Private answer

Yes, you can Invoke stored procedure in SQL Server with the ''exec dbo.XXX'' where XXX is the stored procedure name like this:

Set objDB = CreateObject(''ADODB.Connection'')
strDNS = ''DRIVER=SQL Server;SERVER=DEVDB3SQL8;UID=tsfaust;APP=Microsoft Office 2003;WSID=CL176;DATABASE=Phase1;Trusted_Connection=Yes''
objDB.Open(strDNS)
Set objRec = objDB.Execute(DataTable(''objDBExecute'', dtGlobalSheet))
Set objRec = Nothing
Set objDB = Nothing

'Put this in the DataTable column called objDBExecute

exec UpdateTableByServiceAddrID
'362620'

Marked as spam
Posted by (Questions: 6, Answers: 167)
Answered on February 5, 2010 11:54 pm
0
I've done this in a very similar way and it works fine. Good Answer!
( at April 1, 2010 7:51 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top