How to Import(insert) data from an excel sheet to
Database(table).
Answers were Sorted based on User's Feedback
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 |
Is it possible to run a WinRunner script without using GUI Map file? If yes how?
What do you mean by the logical name of the object.
what is mean winrunner and load runner
i'm using WR 8.2 version to test a form developed using ORACLE10g. The problem i'm facing is, the form has number of edit objects in that only two objects are not able to recognize by WR while running the script. ( if i FIND that object in the GUI File it highlights the object but if i press SHOW button not able to recognize) can anyone tell me the reason for it??
you hae a inbox and got a mail how can you know it is there or not write script.
In the system of coordinates used by WinRunner,the origin(0,0 coordinate)is located in the --- screen?
What is test parameter
can we write exception handlers (object,tsl,pop-up) programatically then how should we insert this in the script?
What are the three windows displayed when a mismatch occurs in Bitmap verification
how u can connect database without using any wizard in winrunner?
What are the reasons that winrunner fails to identify gui object?
wat is mean by software testing,and what is mean by acid testing