Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the Vbscript to connect Database

Answers were Sorted based on User's Feedback



what is the Vbscript to connect Database..

Answer / ravi_kanakam

Check this............

Function db_connect( byRef curSession ,connection_string)
dim connection
on error resume next
' Opening connection
set connection = CreateObject("ADODB.Connection")
If Err.Number <> 0 then
db_connect= "Error # " & CStr(Err.Number) & " " &
Err.Description
err.clear
Exit Function
End If

connection.Open connection_string
If Err.Number <> 0 then
db_connect= "Error # " & CStr(Err.Number) & " " &
Err.Description
err.clear
Exit Function
End If
set curSession=connection
db_connect=0
End Function

Is This Answer Correct ?    9 Yes 1 No

what is the Vbscript to connect Database..

Answer / paayal

VBScript function that you can use to conncet to DB is
CreateObject. we have to create the connection object first
as ADODB and then we can use that connection object to open
the DB connection. Once the connection is open, we can run
SQL query by using a while..wend loop and can get the
derired results data into local data sheet

Is This Answer Correct ?    3 Yes 1 No

what is the Vbscript to connect Database..

Answer / purshottam swarnkar

function Connect database
set con= create object("Adodb.Connection")
set rs=create object("Adodb.Recordset")
con.provider = "microsoft.jet.OLEDB.4.0" '@ For MS access
con.open="Path of Database"
rs.open "select * from xxxx", con
do until re.eof
end function

Is This Answer Correct ?    1 Yes 0 No

what is the Vbscript to connect Database..

Answer / shubhang

I guess this will work out.

Set con = CreateObject("ADODB.Connection")
con.provider = "XYZ"
con.username ="XYZ"
con.password = "XYZ"
con.protocol = "XYZ"
con.port = "XYZ"

RS=con.execute "Select * from ABC"

do while rs.EOF <>True

Is This Answer Correct ?    0 Yes 1 No

what is the Vbscript to connect Database..

Answer / ajreddy

function Connect database
set con= create object("Adodb.Connection")
set rs=create object("Adodb.Recordset")
con.provider = "microsoft.jet.OLEDB.4.0" '@ For MS access
con.open="Path of Database"
rs.open "select * from xxxx", con
do until re.eof
end function

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More QTP Interview Questions

What is difference between Recording time object identification and Run time (Execution) time.

0 Answers   Tech Mahindra,


Tell me the QTP Advantages and Disadvatages ?

1 Answers  


What are the Levels of Automation in QTP

2 Answers  


how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?

3 Answers   HCL,


I am Using QTP 9.1 version. I have created a Shared Object Repository. The size of Shared Object REpository is 9 MB. In my system i am able to execute the script very flexibly and it is very fast. But if i copy the same code into other system with the same configuration, it is executing very slowly(i.e dam slow). It is not happening in all machines it is in only some machines. Can please any one give th esolution. It is high priority to me as i need to give demo to client on their machines.

4 Answers   TCS,


Explain getroproperty and gettoproperty & settoproperty?

1 Answers  


Hi,All How to create a link in excel sheet using qtp

0 Answers  


In QTP for .net application which plug in is used? For Java Application which plug in is used ?

2 Answers   AppLabs, Fraze Tech,


hi gavasker i want how to merg OR's in QTP 8.2 by QTP Plus

1 Answers  


Hi Guys, In one of my interviews, I was asked to Write a paragaraph explaining how much scripting I did in QTP? I don't know where to start and what to write. So I need your help in writing that.

1 Answers  


what is the difference betn QTP 8.0 AND PREVIOUS VERSION

0 Answers   BirlaSoft,


wht is the difference betn check point and output value?

5 Answers   BirlaSoft,


Categories