Click here to Skip to main content
15,888,271 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionhow to parse xml by javascript which will be crossbrowser Pin
Tridip Bhattacharjee11-Feb-10 21:34
professionalTridip Bhattacharjee11-Feb-10 21:34 
Questionjava script is not working for internet explorer 8 Pin
vikas shukla11-Feb-10 20:44
vikas shukla11-Feb-10 20:44 
AnswerRe: java script is not working for internet explorer 8 Pin
Abhishek Sur11-Feb-10 20:49
professionalAbhishek Sur11-Feb-10 20:49 
GeneralRe: java script is not working for internet explorer 8 Pin
vikas shukla11-Feb-10 21:33
vikas shukla11-Feb-10 21:33 
QuestionBulk insert from dataset into db? Pin
ganeshMohan11-Feb-10 20:21
ganeshMohan11-Feb-10 20:21 
AnswerRe: Bulk insert from dataset into db? Pin
thatraja11-Feb-10 20:27
professionalthatraja11-Feb-10 20:27 
GeneralRe: Bulk insert from dataset into db? Pin
ganeshMohan11-Feb-10 20:36
ganeshMohan11-Feb-10 20:36 
GeneralRe: Bulk insert from dataset into db? Pin
thatraja11-Feb-10 20:50
professionalthatraja11-Feb-10 20:50 
your code will be like below.
C#
string strQuery1="insert into tbl1(column) ";
string strQuery2="insert into tbl2(column2) ";

for (int i=1;ds.tables[0].rows.count;i++)
{
	strQuery1 = strQuery1 + " SELECT " +  ds.tables[0].Rows[0]["column1"].ToString() + " UNION ALL ";
	strQuery2 = strQuery2 + " SELECT " +  ds.tables[0].Rows[0]["column2"].ToString() + " UNION ALL ";
}

Now you get two queries in that two variables strQuery1, strQuery2, so you can execute with connection or command object.
actually you are executing multiple insert query in loop so it takes long time, but in this way you will get single query so it takes less time.
Then change the code depends on your no of columns which you want to store in db. also use stringbuilder instead of concatenating strings.
thatraja
AnswerRe: Bulk insert from dataset into db? Pin
Abhishek Sur11-Feb-10 20:46
professionalAbhishek Sur11-Feb-10 20:46 
AnswerRe: Bulk insert from dataset into db? Pin
T M Gray12-Feb-10 4:11
T M Gray12-Feb-10 4:11 
AnswerRe: Bulk insert from dataset into db? Pin
beginner in C#.net12-Apr-11 4:11
beginner in C#.net12-Apr-11 4:11 
QuestionNeed to contact code project member. Pin
Hema Bairavan11-Feb-10 20:12
Hema Bairavan11-Feb-10 20:12 
AnswerRe: Need to contact code project member. Pin
i gr811-Feb-10 21:51
i gr811-Feb-10 21:51 
GeneralRe: Need to contact code project member. Pin
Hema Bairavan12-Feb-10 0:20
Hema Bairavan12-Feb-10 0:20 
Questionrun time error Pin
prateekfgiet11-Feb-10 18:16
prateekfgiet11-Feb-10 18:16 
AnswerRe: run time error Pin
i gr811-Feb-10 20:01
i gr811-Feb-10 20:01 
QuestionOut of Placed things in server [solved] Pin
Mehdi Ghiasi11-Feb-10 9:27
Mehdi Ghiasi11-Feb-10 9:27 
AnswerRe: Out of Placed things in server Pin
Abhishek Sur11-Feb-10 11:43
professionalAbhishek Sur11-Feb-10 11:43 
GeneralRe: Out of Placed things in server Pin
Anurag Gandhi11-Feb-10 17:55
professionalAnurag Gandhi11-Feb-10 17:55 
QuestionEntityDatasource Pin
Sider8911-Feb-10 8:45
Sider8911-Feb-10 8:45 
AnswerRe: EntityDatasource Pin
Not Active11-Feb-10 9:20
mentorNot Active11-Feb-10 9:20 
GeneralRe: EntityDatasource Pin
Sider8911-Feb-10 9:48
Sider8911-Feb-10 9:48 
Questionhow to display image from database Pin
netJP12L11-Feb-10 7:18
netJP12L11-Feb-10 7:18 
AnswerRe: how to display image from database Pin
Not Active11-Feb-10 8:16
mentorNot Active11-Feb-10 8:16 
GeneralRe: how to display image from database Pin
netJP12L11-Feb-10 10:46
netJP12L11-Feb-10 10:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.