Click here to Skip to main content
15,921,884 members
Home / Discussions / Database
   

Database

 
AnswerRe: Global exception thrown on execute of stored procedure with parameters Pin
Frank Kerrigan10-Apr-06 1:06
Frank Kerrigan10-Apr-06 1:06 
GeneralRe: Global exception thrown on execute of stored procedure with parameters Pin
Cannibal10-Apr-06 7:47
Cannibal10-Apr-06 7:47 
GeneralRe: Global exception thrown on execute of stored procedure with parameters Pin
Cannibal10-Apr-06 10:01
Cannibal10-Apr-06 10:01 
QuestionDataKeyField,God bless it... Pin
amin_behzadi6-Apr-06 5:56
professionalamin_behzadi6-Apr-06 5:56 
AnswerRe: DataKeyField,God bless it... Pin
junglerover776-Apr-06 16:51
junglerover776-Apr-06 16:51 
AnswerRe: DataKeyField,God bless it... Pin
munklefish9-Apr-06 7:04
munklefish9-Apr-06 7:04 
Questionload + save ADO.NET Methodology (no code) Pin
il_manti6-Apr-06 5:45
il_manti6-Apr-06 5:45 
AnswerRe: load + save ADO.NET Methodology (no code) Pin
Colin Angus Mackay6-Apr-06 20:54
Colin Angus Mackay6-Apr-06 20:54 
il_manti wrote:
load into dataset, modify by rows and columns, update changes


I hate that too and I don't use it ever.


il_manti wrote:
load into dataset, parse into objects and arrays, then dump into dataset and save all


You're right. It is very inneficient - I don't recomment this either.


il_manti wrote:
load into dataset, parse, dump all data including modifications into new dataset, compare with original dataset, change modified rows only, save old dataset (with modifications)


Unfortunately this is still inefficient - also, remember that you should be treating this data as a "set" - i.e. there is no specific order of the items in it.

What I sometimes do is:
* Load into my objects using a DataReader (that is what the data adapter is doing anyway when it populates the DataSet - I might as well remove one step, and save a lot of memory)
* You might want to consider adding a dirty flag (initial value false) to your objects and make sure you access them via properties or methods only - no direct access you your object's fields (member variables). So any call to a set property would set the dirty flag to true.
* Update the database by applying only those objects where the dirty flag is set to true.

You might also want to look at an open source product called NHibernate which is at http://www.hibernate.org/[^]


"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

-- modified at 2:55 Friday 7th April, 2006
GeneralRe: load + save ADO.NET Methodology (no code) Pin
il_manti7-Apr-06 0:57
il_manti7-Apr-06 0:57 
QuestionINSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 3:53
ChrRun6-Apr-06 3:53 
AnswerRe: INSERT INTO....!?!?!?! Pin
albCode6-Apr-06 4:56
albCode6-Apr-06 4:56 
GeneralRe: INSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 5:16
ChrRun6-Apr-06 5:16 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode6-Apr-06 5:31
albCode6-Apr-06 5:31 
GeneralRe: INSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 9:34
ChrRun6-Apr-06 9:34 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode6-Apr-06 20:54
albCode6-Apr-06 20:54 
GeneralRe: INSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 22:48
ChrRun6-Apr-06 22:48 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode6-Apr-06 23:06
albCode6-Apr-06 23:06 
GeneralRe: INSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 23:31
ChrRun6-Apr-06 23:31 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode6-Apr-06 23:37
albCode6-Apr-06 23:37 
GeneralRe: INSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 23:39
ChrRun6-Apr-06 23:39 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode6-Apr-06 23:42
albCode6-Apr-06 23:42 
GeneralRe: INSERT INTO....!?!?!?! Pin
ChrRun6-Apr-06 23:53
ChrRun6-Apr-06 23:53 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode7-Apr-06 0:04
albCode7-Apr-06 0:04 
GeneralRe: INSERT INTO....!?!?!?! Pin
Colin Angus Mackay7-Apr-06 0:20
Colin Angus Mackay7-Apr-06 0:20 
GeneralRe: INSERT INTO....!?!?!?! Pin
albCode7-Apr-06 0:24
albCode7-Apr-06 0:24 

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.