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



Hi I have created a table in the MS access database. I want to access the table in this database t..

Answer / 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

More QTP Interview Questions

i need qtp tutorial. pls send it to sridhar.k151@g mail.com

0 Answers  


I am verifying the actual vs the input value to make sure that they been entered correctly. In the Global Sheet I have a column called Customer with the multiple names in each row and now I am trying to capture the value during runtime under the column name Customer_in_Apps. Somewhat it works but during runtime the values are being stored in each column vs each row i.e., Customer_in_Apps, Customer_in_Apps1. Automatically it add columns instead of rows. row=datatable.getsheet("Global").GetRowCount for x=1 to row datatable.getsheet("Global").SetCurrentRow(x) Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Val1=Datatable.Value("Customer",dtGlobalSheet) Val2 = Datatable.GlobalSheet.AddParameter("Customer_in _Apps",runtimevalue) If (trim(Val2)=trim(Val1)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &_Val2 else Reporter.ReportEvent micFail, "Customer validation unsuccessful", "Actual Value: " &Val1&vbcrlf& "Customer Value: " &Val2 End If Next

3 Answers  


What are the trigger events in qtp?

1 Answers  


How to capture the tooltip of webelement,if there are two values displayed in tooltip of webelement?

1 Answers  


Give one example of Standard checkpoint in qtp 10?

1 Answers  


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

1 Answers  


How to retrieve the object properties at runtime without the usage of GetROProperty?

3 Answers   Cap Gemini,


I have a login page like username, password and login. I have to pass the 50 user names and 50 passwords but how can i test this page with out using parameters?

2 Answers  


Is it possible to return multiple values from a function..? Then how..?

3 Answers  


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

0 Answers  


What is the difference between QTP 8.2 and QTP 9.2 ?

4 Answers   IBM, Infotech,


Tell me the difference between the Data Driven Frame work and Keyword Driven frame work?

3 Answers   Semantic Space,


Categories