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

How to Recognise List Boxes and Combo boxes for Web Applications In WinRunner 7.5 please.....

1 Answers   CBE Software,


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

2 Answers   IBM,


What is the function that can be used to get the length of the edit box, other than 'Length(outvariable)' ?

1 Answers   Fidelity,


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

0 Answers   Subex,


Can we run WinRunner scripts on the backend?

4 Answers  






can anybody tell me which type of questions raised on ERP domine in interviews?

0 Answers  


What is keyword driven testing? what is the difference between severity and priority?

2 Answers   Mind Tree,


How do you find the number of elements in a list box in winrunner?

1 Answers   BeBo Technologies,


What is the different between GUI map and GUI map files?

1 Answers   Ordain Solutions,


Friends,while installing winrunner,after setup unknowingly without generating license i opened winrunner.it didn't work,then i uninstalled wr ,and again installed properly ,generated license,opened winrunner .error msg :TMP environemnt variable is set to invalid folder.it must be set to valied folder.TMP is not a directory ,Exiting........ so kindly suggest me the solution

1 Answers  


how do you analyze the result in update and debug mode

1 Answers  


How to force wr to learn the sub-items on a menu?

0 Answers  


Categories