‘Simply specify a connection string, which identifies the data store you want to work with strConnection = “DRIVER=SQL Server;SERVER=NLT-SQL;UID=sa;PWD=p@$$word;APP=QuickTest Professional;WSID=NTPC01032;DATABASE=casu10;” Set oConn = CreateObject(“ADODB.Connection”) ‘ Create a Connection object Set oCmd = CreateObject(“ADODB.Command”) oConn.Open strConnection ‘ Open a Connection if (Err.Number 0) then MsgBox “Unable to connect to database” & CR &_ “Error(” & Err.Number [...]
Filed under: QTP's DB connection | Tagged: QTP with DB connectivity, QTP with SQL server connectivity | Leave a Comment »