Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


How to Import(insert) data from an excel sheet to
Database(table).

Answers were Sorted based on User's Feedback



How to Import(insert) data from an excel sheet to Database(table)...

Answer / atif

csv =comma separater version

Is This Answer Correct ?    1 Yes 2 No

How to Import(insert) data from an excel sheet to Database(table)...

Answer / naga chiranjeevi kota

Session="mysession";

connstring="DSN=DQMCHIRU;UID=scott;pwd=tiger;server=Orcl";
rc=db_connect(Session,connstring);
dqmdata = "C:\TestSheet.xls";
rc = ddt_open(dqmdata, DDT_MODE_READWRITE);

ddt_get_row_count(dqmdata,noOfRows);
printf(noOfRows);
for(i=0;i<noOfRows;i++)
#for(i=0;i<1;i++)
{
a = ddt_val_by_row(dqmdata,i+1,"a");
b = ddt_val_by_row(dqmdata,i+1,"b");
c = ddt_val_by_row(dqmdata,i+1,"c");
d = ddt_val_by_row(dqmdata,i+1,"d");
x="insert into dqmchiru values('"&a &"','"&b &"','"&c
&"','"&d&"')";
printf("R"&i+1&": "&x);
dc=db_execute_query(Session,x,rows);

}
dc=db_execute_query(Session,"Commit",rows);
db_disconnect(Session);
ddt_save(dqmdata);
ddt_close(dqmdata);


answer by: Naga Chiranjeevi Kota(iGATE)

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More WinRunner Interview Questions

What is the automation process in winrunner?

3 Answers   Second Foundation,


how can we make use of virtual object wizard to identify similar object can u explain with an example

2 Answers  


what are the stages of software development life cycle?

3 Answers   Agility e-Services, Trigent,


what is the regular expression for dd-mm-yyyy?

2 Answers   IBM,


What is the purpose of gui spy?

0 Answers  






what is qtp licence

0 Answers  


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

1 Answers   MBT,


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 to Import(insert) data from an excel sheet to Database(table).

2 Answers   GE Capital, iGate,


can anybody tell me about 5 critical,major & low severity and priority with examples.

0 Answers  


how do you know which software with version(ex.msoffice)available in our system,using tsl functions

2 Answers   Satyam,


how to download jmeter from net,is it open source

1 Answers  






Categories