Click here to Skip to main content
16,005,281 members
Home / Discussions / Database
   

Database

 
AnswerRe: DSN / SQL Connection String Pin
Colin Angus Mackay5-Apr-06 7:28
Colin Angus Mackay5-Apr-06 7:28 
GeneralRe: DSN / SQL Connection String Pin
rahsi6-Apr-06 8:30
rahsi6-Apr-06 8:30 
QuestionSQL/VB.Net Pin
MikeUPMC5-Apr-06 5:34
MikeUPMC5-Apr-06 5:34 
AnswerRe: SQL/VB.Net Pin
Colin Angus Mackay5-Apr-06 5:58
Colin Angus Mackay5-Apr-06 5:58 
GeneralRe: SQL/VB.Net Pin
MikeUPMC5-Apr-06 9:14
MikeUPMC5-Apr-06 9:14 
GeneralRe: SQL/VB.Net Pin
Colin Angus Mackay5-Apr-06 9:54
Colin Angus Mackay5-Apr-06 9:54 
QuestionUpdate 100 000 rows.... Pin
Pius__X5-Apr-06 4:53
Pius__X5-Apr-06 4:53 
AnswerRe: Update 100 000 rows.... Pin
Colin Angus Mackay5-Apr-06 5:29
Colin Angus Mackay5-Apr-06 5:29 
Pius__X wrote:
.NET is only problem and problem


Seems to be a case of a bad workman blaming his tools.


Pius__X wrote:
SELECT ID FROM Main


This will return every row in Main. Which you then loop over and update Main again. So you are updating EVERY row in Main.

You could reduce all this code into ONE SINGLE SQL statement - not 100,001 statements:
UPDATE Main SET F3=ID


This will do the same as your code. You need to call it exactly ONCE. It will likely take less that one second to execute (assuming the database doesn't need to update any indexes, run triggers, etc. also)


"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)

My: Website | Blog
GeneralRe: Update 100 000 rows.... Pin
Pius__X5-Apr-06 11:09
Pius__X5-Apr-06 11:09 
GeneralRe: Update 100 000 rows.... Pin
Colin Angus Mackay5-Apr-06 11:15
Colin Angus Mackay5-Apr-06 11:15 
GeneralRe: Update 100 000 rows.... Pin
Colin Angus Mackay5-Apr-06 11:17
Colin Angus Mackay5-Apr-06 11:17 
GeneralRe: Update 100 000 rows.... Pin
Pius__X5-Apr-06 23:39
Pius__X5-Apr-06 23:39 
GeneralRe: Update 100 000 rows.... Pin
Colin Angus Mackay6-Apr-06 0:09
Colin Angus Mackay6-Apr-06 0:09 
QuestionExceptionally dumb SQL Server question Pin
BambooMoon5-Apr-06 4:52
BambooMoon5-Apr-06 4:52 
AnswerRe: Exceptionally dumb SQL Server question Pin
Colin Angus Mackay5-Apr-06 5:21
Colin Angus Mackay5-Apr-06 5:21 
QuestionRe: Exceptionally dumb SQL Server question Pin
BambooMoon5-Apr-06 8:24
BambooMoon5-Apr-06 8:24 
AnswerRe: Exceptionally dumb SQL Server question Pin
Colin Angus Mackay5-Apr-06 9:49
Colin Angus Mackay5-Apr-06 9:49 
QuestionHow to do that????? Pin
Pius__X5-Apr-06 4:35
Pius__X5-Apr-06 4:35 
AnswerRe: How to do that????? Pin
Colin Angus Mackay5-Apr-06 5:11
Colin Angus Mackay5-Apr-06 5:11 
Questionfree online SQL Formatter Pin
Tako.Lee4-Apr-06 23:28
Tako.Lee4-Apr-06 23:28 
QuestionHow to Save the values in DataBase. Pin
Amit Agarrwal4-Apr-06 23:23
Amit Agarrwal4-Apr-06 23:23 
QuestionImporting CSV Files Pin
clint19824-Apr-06 23:22
clint19824-Apr-06 23:22 
AnswerRe: Importing CSV Files Pin
PaulMcKenzie4-Apr-06 23:36
PaulMcKenzie4-Apr-06 23:36 
GeneralRe: Importing CSV Files Pin
PaulMcKenzie4-Apr-06 23:38
PaulMcKenzie4-Apr-06 23:38 
QuestionSending email using Sql Server 2000 CDOSYS Pin
ankushmn4-Apr-06 22:03
ankushmn4-Apr-06 22:03 

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.