Click here to Skip to main content
15,923,226 members
Home / Discussions / C#
   

C#

 
GeneralRe: inherited form Pin
pampam11030-Jan-09 22:37
pampam11030-Jan-09 22:37 
GeneralRe: inherited form Pin
Wendelius30-Jan-09 22:53
mentorWendelius30-Jan-09 22:53 
GeneralRe: inherited form Pin
pampam11030-Jan-09 22:59
pampam11030-Jan-09 22:59 
GeneralRe: inherited form Pin
Najmal31-Jan-09 3:35
Najmal31-Jan-09 3:35 
AnswerRe: inherited form Pin
Christian Graus30-Jan-09 22:27
protectorChristian Graus30-Jan-09 22:27 
GeneralRe: inherited form Pin
pampam11030-Jan-09 22:54
pampam11030-Jan-09 22:54 
QuestionIn MSSQL, how to find any row has updated or not after executing the update query? [modified] Pin
S a n d y30-Jan-09 21:08
S a n d y30-Jan-09 21:08 
AnswerRe: In MSSQL, how to find any row has updated or not after executing the update query? Pin
Wendelius30-Jan-09 22:20
mentorWendelius30-Jan-09 22:20 
The first thing is that the constructor of SqlDataAdapter expects to receive a SELECT string, not an UPDATE string. Also when using SqlDataAdapter you don't concatenate values to the statement (actually you should never do this.

It seems that you've mixed SqlDataAdapter with SqlCommand. So:
- create a proper select sattement
- use that when constructing
- if you want that the update statement is generated automatically, make sure that the select command contains key column from your table. Also use SqlCommandBuilder to create the select command
- otherwise create a SqlCommand for UPDATE and place that in SqlDataAdapter.UpdateCommand

After those steps you can try to call the Update method of the SqlDataAdapter.

The need to optimize rises from a bad design.My articles[^]

AnswerRe: In MSSQL, how to find any row has updated or not after executing the update query? Pin
Christian Graus30-Jan-09 22:26
protectorChristian Graus30-Jan-09 22:26 
AnswerRe: In MSSQL, how to find any row has updated or not after executing the update query? Pin
Najmal31-Jan-09 3:42
Najmal31-Jan-09 3:42 
Questionusing enterprise logging how to create custom event logs Pin
mdkarimulla30-Jan-09 20:41
mdkarimulla30-Jan-09 20:41 
AnswerRe: using enterprise logging how to create custom event logs Pin
Wendelius30-Jan-09 22:30
mentorWendelius30-Jan-09 22:30 
QuestionDatagridview Update Pin
sjs4u30-Jan-09 19:11
sjs4u30-Jan-09 19:11 
AnswerRe: Datagridview Update Pin
raihansazal31-Jan-09 17:46
raihansazal31-Jan-09 17:46 
Questiontokenzing strings Pin
lawrenceinba30-Jan-09 18:23
lawrenceinba30-Jan-09 18:23 
AnswerRe: tokenzing strings Pin
Wes Aday30-Jan-09 18:37
professionalWes Aday30-Jan-09 18:37 
AnswerRe: tokenzing strings Pin
Christian Graus30-Jan-09 18:47
protectorChristian Graus30-Jan-09 18:47 
GeneralRe: tokenzing strings Pin
lawrenceinba30-Jan-09 19:38
lawrenceinba30-Jan-09 19:38 
GeneralRe: tokenzing strings Pin
Christian Graus30-Jan-09 20:20
protectorChristian Graus30-Jan-09 20:20 
GeneralRe: tokenzing strings Pin
lawrenceinba30-Jan-09 20:37
lawrenceinba30-Jan-09 20:37 
GeneralRe: tokenzing strings Pin
Christian Graus30-Jan-09 21:02
protectorChristian Graus30-Jan-09 21:02 
GeneralRe: tokenzing strings Pin
lawrenceinba30-Jan-09 22:33
lawrenceinba30-Jan-09 22:33 
GeneralRe: tokenzing strings Pin
#realJSOP30-Jan-09 23:47
professional#realJSOP30-Jan-09 23:47 
AnswerRe: tokenzing strings Pin
Najmal31-Jan-09 3:48
Najmal31-Jan-09 3:48 
Questionxml file encryption and decryption Pin
vishnukamath30-Jan-09 18:06
vishnukamath30-Jan-09 18:06 

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.