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


Please Help Members By Posting Answers For Below Questions

How to find the length of the string in qtp?

581


In qtp is it possible to check broken links of a page?

588


How smart identification works in qtp ?

578


Mention the test steps of qtp.

542


is there any addin for remedy user application

1744






Explain different checkpoints in qtp.

723


What is the quicktest professional testing process?

532


Tell me about your project? please help me how to tell about insurance project

1537


i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click

1469


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

1352


what is keyword driven testing in qtp?n how is it useful?

1493


hou can we use vb script in qtp could u tell me breafly

1740


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

585


what is the difference between development and testing

2392


How we can import data from database?

651