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 everybody, can we maintain the state of page in QTP? 1. suppose i opened a notepad text file i entered some text and changed the font type and font size and saved that file. 2. Now next time when i will open a new notepad file it is showing me that font type and size which i changed in my previous step. 3. Here i want that QTP should capture the default setting i.e. it should maintain the state of the page. Thanks in advance, Gaytri

0 Answers  


what is verification & validation?

2 Answers   Accenture, TCS,


Explain key word driven frame work?How to use in real time?

2 Answers   HP,


How you test the object which is dynamically changes its location?

7 Answers   Wipro,


i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording

3 Answers   Semantic Space,






In what occasion we can specify global sheet and action sheet?

0 Answers  


How i can use and create Library functions in QTP and what is the proces .

2 Answers  


what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


how quick test record on dynamically generated urls and web pages.

3 Answers   Infosys, Satyam,


What is time parameter?

1 Answers  


How to call actions in QTP?

2 Answers   Wipro,


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

0 Answers  


Categories