Click here to Skip to main content
15,895,256 members
Home / Discussions / C#
   

C#

 
GeneralRe: Anakrino and .NET 1.1 : crashes bad :-( Pin
Kannan Kalyanaraman6-Mar-03 23:09
Kannan Kalyanaraman6-Mar-03 23:09 
GeneralRe: Anakrino and .NET 1.1 : crashes bad :-( Pin
Nish Nishant7-Mar-03 3:15
sitebuilderNish Nishant7-Mar-03 3:15 
GeneralRe: Anakrino and .NET 1.1 : crashes bad :-( Pin
Kannan Kalyanaraman7-Mar-03 15:50
Kannan Kalyanaraman7-Mar-03 15:50 
GeneralRe: Anakrino and .NET 1.1 : crashes bad :-( Pin
Richard Deeming7-Mar-03 4:51
mveRichard Deeming7-Mar-03 4:51 
GeneralThat frassin brassin adapter Pin
stephen.hazel6-Mar-03 17:04
stephen.hazel6-Mar-03 17:04 
GeneralRe: That frassin brassin adapter Pin
Paul Riley7-Mar-03 3:16
Paul Riley7-Mar-03 3:16 
GeneralFlash Windows in C# Pin
Member 1609886-Mar-03 16:57
Member 1609886-Mar-03 16:57 
GeneralHelp: Save data back to MS Access DB Pin
DionChen6-Mar-03 10:55
DionChen6-Mar-03 10:55 
Hi, all,

I am very close to finish my first .NET application( C#, Winform Datagrid, and MS Access database). I can modify all the data in my DataSet on my winform datagrid. NowI am trying for the first time to save the data back to my Access DB. When I call daMyDataAdaptor.Update( for a single table), I got this attached error. It says the UPDATE statement has syntax error, but the Statement was created by the wizard when I configured DataAdaptor, how can it be wrong? I know this must be something I missed, Please help.

Due to size limitation of the attachment, I can not attach the small test program. If you can help me, I can sent you the zip test program.

Code on Save button as follows:
------------------------------------

if ( connMain.State != ConnectionState.Open )
{
connMain.Open();
}

System.Data.OleDb.OleDbTransaction trans = connMain.BeginTransaction();

daTaskList.UpdateCommand.Transaction = trans;

try
{
daTaskList.Update(dsMain1, "LMTaskList");

//System.Exception MyErr = new System.Exception("Error Occurred");
//throw(MyErr);

trans.Commit();
}

catch(System.Exception err)
{
trans.Rollback();
MessageBox.Show("Failed to save Available Tasks!\n" + "Details: " + err.ToString() );
}

finally
{
connMain.Close();
}
-----------------------------------------------------


I wonder what is wrong with the code I have.

Thanks again.

Dion


QuestionBackspace not handled -- use TranslateAcceleratorIO? Pin
Arun Bhalla6-Mar-03 10:49
Arun Bhalla6-Mar-03 10:49 
GeneralNo long able to debug Pin
monrobot136-Mar-03 10:48
monrobot136-Mar-03 10:48 
GeneralRe: No long able to debug Pin
Danny Blanchard6-Mar-03 11:04
Danny Blanchard6-Mar-03 11:04 
GeneralRe: No long able to debug Pin
monrobot136-Mar-03 12:42
monrobot136-Mar-03 12:42 
GeneralRe: No long able to debug Pin
leppie6-Mar-03 11:07
leppie6-Mar-03 11:07 
GeneralText Changed in WinForm Datagrid cell Pin
DionChen6-Mar-03 9:50
DionChen6-Mar-03 9:50 
QuestionMain menu in a form in a control? Pin
Arun Bhalla6-Mar-03 9:08
Arun Bhalla6-Mar-03 9:08 
AnswerRe: Main menu in a form in a control? Pin
Arun Bhalla6-Mar-03 9:25
Arun Bhalla6-Mar-03 9:25 
QuestionWhats with the big .net download? Pin
_Ace_6-Mar-03 7:50
_Ace_6-Mar-03 7:50 
AnswerRe: Whats with the big .net download? Pin
Paul Watson6-Mar-03 8:18
sitebuilderPaul Watson6-Mar-03 8:18 
AnswerRe: Whats with the big .net download? Pin
Nemanja Trifunovic6-Mar-03 8:59
Nemanja Trifunovic6-Mar-03 8:59 
AnswerRe: Whats with the big .net download? Pin
leppie6-Mar-03 11:13
leppie6-Mar-03 11:13 
GeneralMaking of a "standalone" application Pin
_Ace_6-Mar-03 6:43
_Ace_6-Mar-03 6:43 
GeneralRe: Making of a "standalone" application Pin
Nemanja Trifunovic6-Mar-03 6:47
Nemanja Trifunovic6-Mar-03 6:47 
GeneralRe: Making of a "standalone" application Pin
Furty6-Mar-03 19:11
Furty6-Mar-03 19:11 
GeneralWeb Services Pin
Yondan406-Mar-03 6:10
Yondan406-Mar-03 6:10 
General2Questions: Application icon and username Pin
DionChen6-Mar-03 4:02
DionChen6-Mar-03 4:02 

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.