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
Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?
Why do we use breakpoints in QTP?
What is the latest version of qtp?
Explain the features of quick test pro(qtp)?
Define Error Pane of UFT?
Hi can anybody send me the QTP material, To my email ID: nuve1284@gmail.com ?
hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?
Can the user toggle between using Local OR and shared OR for the same action?
how to disable the pop ups through QTP using a script
How do you capture tooltip using QTP?
whenever U using QTP,Test Director, Why we using separate Bug tracking tool?
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
What is Distributed testing? How does UFT support it?
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing