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 are the stages of software development life cycle?

5 Answers   Agility e-Services, Trigent,


I want to do smoke test in my application but i have learnt the application before recording but im getting an error class name not found while running the script.I want to check each links and each text in my application. Can anybody answer my quesion plz.If it is possible i want test script for Yahoo login form with "New User" Login.

0 Answers  


which method are using to obtain runtime property of an object

1 Answers   Polaris,


How do you handle pop-up exceptions?

0 Answers  


How do you identify which files are loaded in the gui map?

0 Answers  


what are types of black box and white box testing?

1 Answers  


How to read the third party controls in the application

0 Answers  


What different actions are performed by find and show button?

0 Answers  


Hi, Currently i am using winrunner for my project.Its a java project. When i am running the script its failing in cliking an image link("My Profile"). The image object is eventhough exists in GUI map editor script is failing to recongize the object. I am getting the error of "Web_image_click:"My Profile" Error:Object is not found". I recorded the script and executed it is not running it shows the same error. The following physical description displaying in GUI map editor : { class: object, MSW_class: html_rect, html_name: "My Profile" } The thing was running successfully, I could not able to identify something happen to the script its showing error. Please give solution for this problem. Let me know if need more information. Regards, Sankar shankarmg@gmail.com

3 Answers   CA,


How do you suppress a regular expression?

0 Answers  


tell me about compiled module & function generator

5 Answers   CTS,


How to connect TestDirector from winrunner tool?

2 Answers   STG,


Categories