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

Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional" O/P "Professional Test Quick"

5 Answers   Cap Gemini,


what is Unicoad Compatibility ???? HOw does this makes a diffrence from Winrunner.???

1 Answers   GE,


how to test globalisation testing using qtp? lets take an example: suppose i have to test the word is in hindi "ratikanta", how we test it by using descriptive programming or any method??

2 Answers   Siemens,


3.How to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

5 Answers  


Thanks....But can u tell me how i use the QTP for GIS with one Example...

0 Answers  






X=10,Y=20 you need to swap the numbers without using a third variable?

5 Answers  


What is active screen?

0 Answers  


what is the diffrence bw qtp architectute and qtp framework?

0 Answers  


IF I SET THE VIRTUAL OBJECT AFTER THAT MAXIMIZE THE APPLICATION THEN QTP SENT ERROR OR EXECUTE SUCCESSFULLY? WHY ?

2 Answers   CTC, Infosys,


what are the disadvantages in QTP 9.2?

1 Answers  


can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?

0 Answers   Sapient, Satyam, TCS,


How to capture screen shots when an error occurs?

2 Answers  


Categories