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 |
Hi guys pls any one help me , I am facing this problem since last one week , my question is in there 1000 rows and 1000 coloums , i want to pick the one record , how ?
How do you do digital signature test in winrunner?
what is mean feasablity testing,
How do you handle tsl exceptions?
There is an error in opening WinRunner "Error: open connection to CRV (-1). Exiting..." and then the winrunner is terminating. Can any one suggest solution for this?
Please give an example for test case.
winrunner & QTP both are developed by mercury interactive,what is main difference between these two? Thanks in ADVANCE
Please any one Knows Send the Website for Writing different TestCases with different Examples
How do you load GUI map?
How do you copy and move objects between different gui map files?
Is 'public' allowed inside of the function declarations?
What is the different types of Data driven testing?