Connection string issue with MS access - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Connection string issue with MS access (/Thread-Connection-string-issue-with-MS-access) |
Connection string issue with MS access - 1981.madhu@gmail.com - 11-19-2009 Hi , I have created a database in MSaccess(.mdb).while i connecting in the qtp .Its giving error My issue is i want to conenct to db and retrive one table and its value in the external excel sheet or datatable my code : Code: set a=createobject('Odbc.connection") while runing its stopping at second line .i think my connection string is wrong .hw can i get the correct connection string for .mdb file. pls help RE: Connection string issue with MS access - Jackomcnabb - 11-19-2009 go to ConnectionStrings.com RE: Connection string issue with MS access - pavansri - 11-20-2009 you should create a object for "adodb.connection" not "Odbc.connection" anyways following code should solve your problem.. Code: Set conn = CreateObject("adodb.connection") RE: Connection string issue with MS access - 1981.madhu@gmail.com - 11-20-2009 Hi pavan I followed this code Code: Set con = CreateObject("adodb.connection") my scenario is i want to connect database and from one table 's column 's value fetch and save in excel sheet or datatable. ex.form employee table i want to fetch First name column's values in excel r datatable. pls help RE: Connection string issue with MS access - 1981.madhu@gmail.com - 11-20-2009 pls help on this issue Thanks in advance RE: Connection string issue with MS access - sreekanth chilam - 11-21-2009 Hi Madhu, Check out the below example & implement accordingly. Note: Create a Datasource("flight32.dsn") in C:\Program Files\Common Files\ODBC\Data Sources( which is assigned to FILEDSN variable in below code) Code: Dim db Once test run is finished,check in RunTime Datatable of Test Results, entire Backend Table's data under "Customer_Name" column will imported to QTP Datatable's Column "CustomerName" Hope this would solve your issue. |