Click here to Skip to main content
15,896,338 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Set Widths of Columns in a DataGrid, Anyone? Pin
Heath Stewart10-Jul-03 9:11
protectorHeath Stewart10-Jul-03 9:11 
GeneralRe: How to Set Widths of Columns in a DataGrid, Anyone? Pin
Khang Nguyen10-Jul-03 11:50
Khang Nguyen10-Jul-03 11:50 
GeneralExport Unmanaged DLL's classes instead of just function using PInvoke Pin
Anonymous10-Jul-03 5:40
Anonymous10-Jul-03 5:40 
GeneralRe: Export Unmanaged DLL's classes instead of just function using PInvoke Pin
leppie10-Jul-03 7:10
leppie10-Jul-03 7:10 
GeneralRe: Export Unmanaged DLL's classes instead of just function using PInvoke Pin
Anonymous10-Jul-03 7:36
Anonymous10-Jul-03 7:36 
GeneralRe: Export Unmanaged DLL's classes instead of just function using PInvoke Pin
leppie10-Jul-03 11:24
leppie10-Jul-03 11:24 
GeneralError Reading from MDB System Table Pin
SD310-Jul-03 5:17
SD310-Jul-03 5:17 
QuestionWhy DataSet Not Updated, Any Gurus? Pin
Khang Nguyen10-Jul-03 5:14
Khang Nguyen10-Jul-03 5:14 
Hello my Gurus,

I could not figure out why my DataSet, more specificly my [M-T] table is not updated at all and no exceptions generated.

iNumOfAffectedRecs is always = 0;

Did I miss something?
Thanks in advance
Khang Nguyen

=================================================================================

private void btnTestUpdate_Click(object sender, System.EventArgs e)
{
MDSConnection MDSConn = new MDSConnection();
OleDbConnection conn = MDSConn.GetCon(); // conn is already open!

string sQuery = "SELECT * FROM [M-T]";
OleDbDataAdapter adapter = new OleDbDataAdapter(sQuery, conn);
DataSet dataSet = new DataSet("Update_DataSet");
adapter.Fill(dataSet);

Console.WriteLine("[M-T] rows = " + dataSet.Tables[0].Rows.Count);
DataRow row = dataSet.Tables[0].NewRow();
row["ModuleID"] = "LK-STT1"; // text
row["TaskID"] = 791; // number
dataSet.Tables[0].Rows.Add(row);
dataSet.Tables[0].AcceptChanges();
Console.WriteLine("[M-T] rows = " + dataSet.Tables[0].Rows.Count);

OleDbCommandBuilder commandBuilder = new OleDbCommandBuilder(adapter);
// adapter.Update(dataSet, dataSet.Tables[0].ToString());
int iNumOfAffectedRecs = adapter.Update(dataSet);

MDSConn.Cleanup(); // con is closed
}

AnswerRe: Why DataSet Not Updated, Any Gurus? Pin
Heath Stewart10-Jul-03 9:14
protectorHeath Stewart10-Jul-03 9:14 
GeneralRe: Why DataSet Not Updated, Any Gurus? Pin
Khang Nguyen10-Jul-03 11:54
Khang Nguyen10-Jul-03 11:54 
GeneralC#, Java and memory Pin
albean10-Jul-03 4:52
albean10-Jul-03 4:52 
GeneralRe: C#, Java and memory Pin
Ylis10-Jul-03 5:01
Ylis10-Jul-03 5:01 
GeneralRe: C#, Java and memory Pin
KingTermite11-Jul-03 7:44
KingTermite11-Jul-03 7:44 
Generalaccessing the key buffer Pin
Ylis10-Jul-03 4:51
Ylis10-Jul-03 4:51 
GeneralRe: accessing the key buffer Pin
Heath Stewart10-Jul-03 11:00
protectorHeath Stewart10-Jul-03 11:00 
GeneralRe: accessing the key buffer Pin
Ylis11-Jul-03 12:51
Ylis11-Jul-03 12:51 
GeneralWindows Application Startup Pin
bcox10-Jul-03 4:34
bcox10-Jul-03 4:34 
GeneralCombo Box Pin
totig10-Jul-03 4:23
totig10-Jul-03 4:23 
GeneralDisplay a form in a windows service Pin
Anonymous9-Jul-03 23:38
Anonymous9-Jul-03 23:38 
GeneralWebservice error: underlying connection was closed Pin
BigAndy9-Jul-03 22:39
BigAndy9-Jul-03 22:39 
GeneralRe: Webservice error: underlying connection was closed Pin
Kannan Kalyanaraman10-Jul-03 0:40
Kannan Kalyanaraman10-Jul-03 0:40 
GeneralContextMenu & TextBox Pin
almigrp9-Jul-03 20:27
almigrp9-Jul-03 20:27 
GeneralRe: ContextMenu & TextBox Pin
Heath Stewart10-Jul-03 3:32
protectorHeath Stewart10-Jul-03 3:32 
GeneralRe: ContextMenu & TextBox Pin
KingTermite11-Jul-03 7:49
KingTermite11-Jul-03 7:49 
GeneralRe: ContextMenu & TextBox Pin
almigrp11-Jul-03 21:23
almigrp11-Jul-03 21:23 

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.