What the genaric function to connect Sql Server using Sql
Server Authentication and Windows Authentication

Answer Posted / kotike

Function DBConnect(Constr)
set oCon=CreateObject("ADODB.Connection")
oCon.open Constr
if oCon.State=0 then
msgbox "connection not opened"
end if
set DBConnect=oCon
End Function

where ever required just call this function and define the
connection string.

ex: set con=DBConnect("Driver=;Server=;database=;user
id=;passwoerd=")

Regards,
mahi.kotike@gmail.com

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When ‘option explicit’ keyword is used in qtp?

843


how u will evaluate the tool for test automation?

1459


What are metrics and matrix?

1451


Where to use Property Let, Property Get, Property Set in UFT

466


What are private functions in QTP? How they can be called from the function library?

719






If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

702


Describe the differences between functions and actions in UFT?

702


How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?

801


What is the syntax to call one script from another?

627


we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1748


What does it mean when a check point is in red color? What do you do?

646


What is the use of "New Property" in "Add properties" of testobject properties in object repository. How can i use "New properties" while writing scripts if i have assign some values to the testobject properties Can anyone help me? plz

1564


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

1585


how to post xml data from QTP scripts to any application?

1590


Explain Descriptive Programming Types with Examples?

1025