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...


How to Get data from database(table) to an excel sheet

Answers were Sorted based on User's Feedback



How to Get data from database(table) to an excel sheet..

Answer / naga chiranjeevi kota

Session="mysession";


connstring="DSN=DQMCHIRU;UID=dqm5map;pwd=dqm5map;server=Orcl";
rc=db_connect(Session,connstring);

x="select PART_NUM,PART_ORG ,RDX_ID,DESCRIPTION from
reference_data_part where part_num like '%31' order by
PART_NUM";
printf(x);

# Opening the excel sheet
dqmdata = "C:\ExecuteSampleData.xls";
rc = ddt_open(dqmdata, DDT_MODE_READWRITE);
if (rc!= E_OK && rc != E_FILE_OPEN)
pause("Cannot open table.");

dc=db_execute_query(Session,x,rows);

#ddt_get_row_count(dqmdata,rows);
for(i=0;i<rows;i++)
{
db_get_row(Session,i,rowcon);
#ddt_set_row(dqmdata,i);
split(rowcon,rdp,"\t");
for(j=0;j<4;j++)
{
printf("R"&i+1&", C"&j+1&": "&rdp[j+1]);
ddt_set_val_by_row(dqmdata,i+1,"C"&(j+1),rdp[j+1]);

}
}

db_disconnect(Session);
ddt_save(dqmdata);
ddt_close(dqmdata);


answer by: Naga Chiranjeevi Kota(iGATE)

Is This Answer Correct ?    0 Yes 0 No

How to Get data from database(table) to an excel sheet..

Answer / softwaretester4u

hi this is good answer.But i have one question is it
possible to call differect sheets in same excel
like sheet1 have one data,sheet2 have some data in same
excel .is it possible to call ? pls tell me

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WinRunner Interview Questions

what is Retesting and what is the difference between Retesting and Regression testing?

7 Answers   Accenture, Infeneon Technologies,


What is checkpoints?

1 Answers  


Whats a difference between Verification Point and Syncronization point?

6 Answers   AZTEC, CTS,


What does the function represents TL_EXIT and T_EXIT ?

2 Answers   PowerNet Technologies,


how can you explain your Real Estate Project in front of interviewer..? please step by step......

0 Answers  


what is mean by release in quality center and who will perfom?

0 Answers   Subex,


How to automate testcases?what were the challanges that u had in automating win runner?

1 Answers   Wipro,


what is the difference between unit testing,integration testing and interface testing?

4 Answers  


what are the differences you see in e-commerce and banking domain in testing point of view Thanks in Advance

0 Answers  


what is cookies testing and what are the possible test case.

0 Answers  


Tell me the usecase format r u using in ur company?

1 Answers   MBT,


In my application I was supposed to test two columns.The first column1 belongs to one module and the other column2 belongs to other module.The content in both the columns is same.I supposed to check whether the data present in the column1 is same as the one in column2. Each column contains number of rows.So checking each row manually is diificult.Is there any option available in WinRunner or QTP to check the column data.These two columns are available in Data Base Tables. One way is that I can just number of rows in each column so that I can get rows count of both the columns,but apart from that I was supposed to check whether the data is also same in both the tables. Can anybody suggest me how I can go about this.

1 Answers  


Categories