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



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

Answer / 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

More QTP Interview Questions

If object is not recognized by qtp but the object is standard object what is your approach?

0 Answers  


hi i have one doubt is there any companies are taking correspandence courses plz leme know urjent

2 Answers  


In QTP whether is it possible to call a function from one action to another action?

1 Answers  


waht is the difference between QTP 8.2 and 9.0 version

15 Answers   AppLabs, CTS, Polaris,


Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry very urgent. I shall really be very thankful

3 Answers  


how to get the object property

4 Answers   Covansys,


Can U Explain about QTP tool from older version to latest version also its differences?

0 Answers  


What is the main disadvantage of using low level and Analog modes?

2 Answers  


What are the main attributes of test automation?

3 Answers  


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

0 Answers   Livetek,


what is the diff between Procedure and function

3 Answers   iFlex,


When i used this below script to insert value in the Datatable... At run time it was inserting the given value in the specified column, But after execution all those inserted values were cleared automatically... datatable("column name",sheetid)=value

1 Answers  


Categories