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
When ‘option explicit’ keyword is used in qtp?
how u will evaluate the tool for test automation?
What are metrics and matrix?
Where to use Property Let, Property Get, Property Set in UFT
What are private functions in QTP? How they can be called from the function library?
If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?
Describe the differences between functions and actions in UFT?
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
What is the syntax to call one script from another?
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?
What does it mean when a check point is in red color? What do you do?
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
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?
how to post xml data from QTP scripts to any application?
Explain Descriptive Programming Types with Examples?