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

For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

789


i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.

1751


How to connect to a database?

778


Tell me one scenario, the complex functionality you have automated in your project?

1711


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

3120


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1719


How to explain a banking project in interview as a test engineer???

2826


What does mean by Scope of Automation?n How we defined it?

1760


In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?

1699


i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression

1223


What is the parameterization? Give one example?

772


How many ways is to parameterize the value?

830


how to do the batch testing in test director using manual testing procedure?

2002


An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?

858


How do you configure QTP AND Test director?

1682