Click here to Skip to main content
15,894,546 members
Home / Discussions / C#
   

C#

 
GeneralSetup.exe says "<Error Message>" Pin
Arun Bhalla26-Jul-04 10:46
Arun Bhalla26-Jul-04 10:46 
GeneralRe: Setup.exe says "<Error Message>" Pin
Heath Stewart26-Jul-04 10:58
protectorHeath Stewart26-Jul-04 10:58 
GeneralRe: Setup.exe says "<Error Message>" Pin
Arun Bhalla26-Jul-04 12:26
Arun Bhalla26-Jul-04 12:26 
QuestionMDI and modal dialogs causing focus problems? Pin
confusedCS26-Jul-04 10:20
confusedCS26-Jul-04 10:20 
GeneralExcel Automation Add-in Pin
Paulo Rosa26-Jul-04 7:41
Paulo Rosa26-Jul-04 7:41 
GeneralRe: Excel Automation Add-in Pin
Heath Stewart26-Jul-04 18:57
protectorHeath Stewart26-Jul-04 18:57 
GeneralDatabase update error Pin
C#Coder6726-Jul-04 6:28
C#Coder6726-Jul-04 6:28 
GeneralRe: Database update error Pin
Heath Stewart26-Jul-04 13:28
protectorHeath Stewart26-Jul-04 13:28 
According to this snippet, you have no SqlDataAdapter.UpdateCommand, InsertCommand, or DeleteCommand. How do you expect the SqlDataAdapter.Update call to update the database based on the connection and changes in changedDataDs? You need to either assign the appropriate SQL statements with the properties I mentioned above, or use a SqlCommandBuilder when you specify the fields (instead of an asterisk in your SELECT statement).

Also, you don't need to call DataSet.AcceptChanges after calling SqlDataAdapter.Update, since Update calls AcceptChanges for you.

Finally, just because your SELECT statement includes "Dept" for a table doesn't mean that changedDataDs does. This is most likely the source of your exception, though even if it did contain the "Dept" table the lack of UPDATE, INSERT (typically separated by a semi-colon along with a SELECT to make sure auto-assigned fields are filled-in correctly), and DELETE commands would also throw an exception.

 

Microsoft MVP, Visual C#
My Articles
QuestionHow to load file to webbrowser control from richtextbox ? Pin
BeiJing200826-Jul-04 5:24
BeiJing200826-Jul-04 5:24 
AnswerRe: How to load file to webbrowser control from richtextbox ? Pin
Heath Stewart26-Jul-04 11:43
protectorHeath Stewart26-Jul-04 11:43 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
BeiJing200826-Jul-04 17:47
BeiJing200826-Jul-04 17:47 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
Heath Stewart26-Jul-04 18:11
protectorHeath Stewart26-Jul-04 18:11 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
BeiJing200827-Jul-04 1:17
BeiJing200827-Jul-04 1:17 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
Heath Stewart27-Jul-04 3:39
protectorHeath Stewart27-Jul-04 3:39 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
BeiJing200827-Jul-04 17:22
BeiJing200827-Jul-04 17:22 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
Heath Stewart27-Jul-04 17:57
protectorHeath Stewart27-Jul-04 17:57 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
BeiJing200827-Jul-04 19:26
BeiJing200827-Jul-04 19:26 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
BeiJing200827-Jul-04 19:42
BeiJing200827-Jul-04 19:42 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
Heath Stewart28-Jul-04 3:53
protectorHeath Stewart28-Jul-04 3:53 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
BeiJing200827-Jul-04 20:31
BeiJing200827-Jul-04 20:31 
GeneralRe: How to load file to webbrowser control from richtextbox ? Pin
Heath Stewart28-Jul-04 4:00
protectorHeath Stewart28-Jul-04 4:00 
GeneralSendInput Citrix Alt and Ctrl Keys Pin
Gregory Webb26-Jul-04 4:26
Gregory Webb26-Jul-04 4:26 
GeneralRe: SendInput Citrix Alt and Ctrl Keys Pin
Heath Stewart26-Jul-04 11:26
protectorHeath Stewart26-Jul-04 11:26 
GeneralRe: SendInput Citrix Alt and Ctrl Keys Pin
GTWebb27-Jul-04 2:23
GTWebb27-Jul-04 2:23 
GeneralRe: SendInput Citrix Alt and Ctrl Keys Pin
Heath Stewart27-Jul-04 4:03
protectorHeath Stewart27-Jul-04 4: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.