Hi I have created a table in the MS access database. I want
to access the table in this database through QTP. The code
is given below. The code is not working.The following error
is displayed "Data source name not found and no default
driver specified". Any one can correct the code. Thanks in
advance.
Dim dbconnection, rs
Dim ca, sname
Set dbconnection = createobject("ADODB.Connection")
Set rs = createobject("ADODB.Recordset")
dbconnection.open "DSN = MS Access Database","", ""
rs.open "select * from Research", dbconnection
rs.movefirst
If rs.EOF <> True AND rs.BOF<> True then

ca = rs("order_number")
sname = rs("customer_number")
rs.movenext
msgbox ca
msgbox sname
End If

Answer Posted / lakshmi

Hi,


you should to give proper DSN(datasouce name) and its path
of the MS-Access i.e like for Eg:'D:\mydatabase\list.mdb"

I think you understood my point

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can replace string in qtp?

576


tell me abt a time when u had to go above &beyind the call of duty to get the job done

1452


How to find the name of the machine where you are running your automation scripts in qtp?

529


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

1651


What are the different types of recording modes in qtp? Which will be used when?

583






I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?

1774


what is the difference between IE & Netscape in web testing on a log in page

1801


what is supply chain management?

2098


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1458


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

1413


What is the use of an object spy tool in qtp?

568


How do I lauch my test website using code from qtp in different environmet, uat and PPTE?

1468


QTP script is not working on other's machine..

1547


how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief

1545


How can get count of list box?

646