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

Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri

4 Answers  


Explain roles and responsibilites of 2yrs Automation qtp engineer.

3 Answers   Oracle,


What are the Automation Limitations??

1 Answers  


Give a comment on Regular Expressions using QTP?

4 Answers  


how can we return a value from userdefined function for eg 2 functions in func1 iam getting 2 values(a,b) and storing in var(C). now i want to pass that var(c) to another func2 give me the script

1 Answers  






We have a dynamic webtable where rows keep on adding.I have to click on particular row where the status changes to Update or Save.How do you click on Status(either it can be Update or save)

2 Answers   IBM, Infosys,


How to extract the data in the below scenario and dump it in the excel? Link1 Link2 Link3 Link4 numberlink1 text text text numberlink2 text text text numberlink3 text text text numberlink4 text text text So, Here is my question? -- It is a matrix but is not a web table(QTP does not recognize it as a web table) -- Link1, link2 and link3 are links under which text is available -- numberlink1 to numberlink4 are again LINKS -- All the others displayed are text only I want to extract the data in the above scenario and dump it into an excel in the same scenario as it is displayed above. Kindly help.. Thank you

0 Answers  


can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance

2 Answers  


how can we write descriptive programming for menus when qtp is not able to identify it..and how can we write descriptive programming for partially identified and non standard objects..do i have to map the objects before writing the script

2 Answers  


What are the main features we have to compulsory test by using qtp in an web based application

1 Answers  


WHY U CHOOSE TESTING FIELD?

6 Answers   CybAge, TCS,


Explain Checking XML....

1 Answers   Crea,


Categories