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

Hi All As per the requirements i have to copy the data from word document to excel sheet using the QTP Note : Data in word document is in tabular format i.e there is 80 rows and 5 columns table Can any body provide code for this ? Thanks in advance Regards Test123Test

1 Answers  


How we can call the scripit from another scripit in QTP?,Not a call Action

12 Answers  


How to check the URL using Automation tool QTP

2 Answers  


i'm testing the webpage with QTP, in this wabpage i have to choose the CV from the window, but QTP can't recognize the object, so i used the Low LEvel Recording, but every time i run the test, QTP go to halt when it gets to the Recorded part, any solution for that?( except puting delay in the script and manuall selecting, because i've did that)

0 Answers  


i'm using QTP 8.2. A person using QTP 9.0 sends me a QTP TestScript, same when i try to open , an error comes "unexpected file format". Why?? and how to resolve the problem??

2 Answers  


how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!

0 Answers   TCS,


How to merge the two object repositories

3 Answers   Wipro,


How to use conditional loops in qtp ?

0 Answers  


after initiating one project for testing, when exacltly QTP tester role starts?

0 Answers  


write progamming connecting QTP to database sql? this is question asked by interview? please give sql, pl/sql related answer?pls any answer this?

3 Answers   IBM,


How to handle Recovery scenario in QTP. give detailed explanation about recovery scenario.

1 Answers  


Which object model is not supported by QTP? a)COM b)DECOM c)DOM d)DCOM. Pls explain about theese object models?

1 Answers  


Categories