Click here to Skip to main content
15,897,518 members
Home / Discussions / Database
   

Database

 
GeneralRe: Transact SQL conditional Select Pin
Mycroft Holmes29-Mar-11 13:24
professionalMycroft Holmes29-Mar-11 13:24 
AnswerRe: Transact SQL conditional Select Pin
PIEBALDconsult29-Mar-11 15:29
mvePIEBALDconsult29-Mar-11 15:29 
QuestionHow to show the hindi records through ms sql database Pin
Raghav Singh27-Mar-11 23:53
Raghav Singh27-Mar-11 23:53 
AnswerRe: How to show the hindi records through ms sql database Pin
dan!sh 28-Mar-11 5:51
professional dan!sh 28-Mar-11 5:51 
GeneralRe: How to show the hindi records through ms sql database Pin
Wendelius28-Mar-11 6:33
mentorWendelius28-Mar-11 6:33 
GeneralRe: How to show the hindi records through ms sql database Pin
dan!sh 28-Mar-11 6:56
professional dan!sh 28-Mar-11 6:56 
QuestionControl editing rows in Server and client projects Pin
vahidfallahi27-Mar-11 18:36
vahidfallahi27-Mar-11 18:36 
AnswerRe: Control editing rows in Server and client projects Pin
Wendelius27-Mar-11 19:00
mentorWendelius27-Mar-11 19:00 
Do you really mean that other clients won't be able to modify the record while it's under editing at some client or that if 2 clients modify the same record, the program can notice this. Typically it's the later choice.

The latter choice can be achieved using optimistic locking. Add a timestamp column (if SQL Server) to your table which will change every time the record is modified. Now always when updating or deleting, include the value of the timestamp column in the where condition. This way you'll notice if something has changed.

The first one can be done using locking. First you lock the record (for example using update), you keep the transaction open, make modifications in UI and then update again and if everything is fine, commit otherwise rollback. However there should never be UI conversations in the middle of a transaction. This will typically cause many problems. If you're not connected to the database, another process can hold the lock while editing is done.

There are of course several other possibilies and especially if you're talking about offline appplication then factors like how long time between connections how much modifications etc will affect the choice. If the amount of time between edit start and end is long then locking isn't a good choice.
The need to optimize rises from a bad design.My articles[^]

AnswerRe: Control editing rows in Server and client projects Pin
Mycroft Holmes27-Mar-11 21:26
professionalMycroft Holmes27-Mar-11 21:26 
QuestionRestore SQL Database Pin
εїзεїзεїз27-Mar-11 3:15
εїзεїзεїз27-Mar-11 3:15 
AnswerRe: Restore SQL Database Pin
Wendelius27-Mar-11 4:55
mentorWendelius27-Mar-11 4:55 
AnswerRe: Restore SQL Database Pin
Prasanta_Prince13-Apr-11 1:41
Prasanta_Prince13-Apr-11 1:41 
Questionwant a school good database ( tables and columns) Pin
my name is coder ! ! !27-Mar-11 1:54
my name is coder ! ! !27-Mar-11 1:54 
AnswerRe: want a school good database ( tables and columns) Pin
Wendelius27-Mar-11 2:31
mentorWendelius27-Mar-11 2:31 
GeneralRe: want a school good database ( tables and columns) Pin
my name is coder ! ! !27-Mar-11 9:07
my name is coder ! ! !27-Mar-11 9:07 
GeneralRe: want a school good database ( tables and columns) Pin
Wendelius27-Mar-11 9:17
mentorWendelius27-Mar-11 9:17 
GeneralRe: want a school good database ( tables and columns) Pin
my name is coder ! ! !27-Mar-11 21:29
my name is coder ! ! !27-Mar-11 21:29 
GeneralRe: want a school good database ( tables and columns) Pin
Klaus-Werner Konrad31-Mar-11 8:29
Klaus-Werner Konrad31-Mar-11 8:29 
AnswerRe: want a school good database ( tables and columns) Pin
Eddy Vluggen28-Mar-11 9:00
professionalEddy Vluggen28-Mar-11 9:00 
QuestionDelta between records in one column Pin
Member 377323026-Mar-11 20:44
Member 377323026-Mar-11 20:44 
AnswerRe: Delta between records in one column Pin
Wendelius26-Mar-11 22:07
mentorWendelius26-Mar-11 22:07 
GeneralRe: Delta between records in one column Pin
Member 377323026-Mar-11 22:24
Member 377323026-Mar-11 22:24 
GeneralRe: Delta between records in one column Pin
Wendelius26-Mar-11 22:42
mentorWendelius26-Mar-11 22:42 
GeneralRe: Delta between records in one column Pin
Member 377323026-Mar-11 23:16
Member 377323026-Mar-11 23:16 
GeneralRe: Delta between records in one column Pin
Wendelius26-Mar-11 23:38
mentorWendelius26-Mar-11 23:38 

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.