Click here to Skip to main content
14,666,389 members
Home » Discussions » C#
   

C#

 
QuestionA quick question about volatile Pin
Megidolaon30-Jul-08 23:27
MemberMegidolaon30-Jul-08 23:27 
AnswerRe: A quick question about volatile Pin
Guffa30-Jul-08 23:44
MemberGuffa30-Jul-08 23:44 
AnswerRe: A quick question about volatile Pin
Mike Dimmick31-Jul-08 0:13
MemberMike Dimmick31-Jul-08 0:13 
AnswerRe: A quick question about volatile Pin
Megidolaon31-Jul-08 1:11
MemberMegidolaon31-Jul-08 1:11 
GeneralRe: A quick question about volatile Pin
Mike Dimmick31-Jul-08 1:32
MemberMike Dimmick31-Jul-08 1:32 
GeneralRe: A quick question about volatile Pin
Guffa31-Jul-08 1:37
MemberGuffa31-Jul-08 1:37 
AnswerRe: A quick question about volatile Pin
Megidolaon31-Jul-08 1:59
MemberMegidolaon31-Jul-08 1:59 
QuestionHow to insert a new row to MDB file [modified] Pin
Admin88730-Jul-08 21:53
MemberAdmin88730-Jul-08 21:53 
First of all, i wrote execly the same Subject yesterday but i didnt understand the answer.. Frown | :(

i want to add a new row to specific MDB file...

my code is:
string connectionString = "provider=Microsoft.JET.OLEDB.4.0; " + "data source =" + Dir;
        
string commandString = "Select id,Event from Events";
           
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(commandString, connectionString);
DataSet ds = new DataSet();             
dataAdapter.Fill(ds, "Events");
                                          
DataTable datatable = ds.Tables[0];
DataRow newRow = datatable.NewRow();
newRow["id"] = "aaa";                  
newRow["Event"] = "bbb";

datatable.Rows.Add(newRow);

dataAdapter.Update(ds, "Events");
ds.AcceptChanges();
Application.DoEvents();


i did this code but it pop a exception:

"Update requires a valid InsertCommand when passed DataRow collection with new rows"

What i need t do? and where?

thank you very Much
G.

modified on Thursday, July 31, 2008 3:59 AM

AnswerRe: How to insert a new row to MDB file Pin
leppie30-Jul-08 22:41
Memberleppie30-Jul-08 22:41 
AnswerRe: How to insert a new row to MDB file Pin
rah_sin30-Jul-08 22:42
professionalrah_sin30-Jul-08 22:42 
QuestionSetup with Custom Action Pin
Sifar - 030-Jul-08 21:45
MemberSifar - 030-Jul-08 21:45 
AnswerRe: Setup with Custom Action Pin
leppie30-Jul-08 22:43
Memberleppie30-Jul-08 22:43 
AnswerRe: Setup with Custom Action Pin
Frank Horn30-Jul-08 23:17
MemberFrank Horn30-Jul-08 23:17 
Questionproblem_details to solve the warning Pin
ktamanna30-Jul-08 21:42
Memberktamanna30-Jul-08 21:42 
AnswerRe: problem_details to solve the warning Pin
leppie30-Jul-08 22:44
Memberleppie30-Jul-08 22:44 
QuestionHow to resize the form at run time on load Pin
tasumisra30-Jul-08 21:32
Membertasumisra30-Jul-08 21:32 
AnswerRe: How to resize the form at run time on load Pin
Syed Shahid Hussain30-Jul-08 22:32
MemberSyed Shahid Hussain30-Jul-08 22:32 
GeneralRe: How to resize the form at run time on load Pin
tasumisra30-Jul-08 23:04
Membertasumisra30-Jul-08 23:04 
GeneralRe: How to resize the form at run time on load Pin
Syed Shahid Hussain31-Jul-08 17:39
MemberSyed Shahid Hussain31-Jul-08 17:39 
GeneralRe: How to resize the form at run time on load Pin
tasumisra31-Jul-08 23:36
Membertasumisra31-Jul-08 23:36 
GeneralRe: How to resize the form at run time on load Pin
tasumisra31-Jul-08 23:39
Membertasumisra31-Jul-08 23:39 
GeneralRe: How to resize the form at run time on load Pin
Syed Shahid Hussain1-Aug-08 2:42
MemberSyed Shahid Hussain1-Aug-08 2:42 
QuestionPerfMon CPU Usage not same as Task Manager reading Pin
alex120530-Jul-08 21:23
Memberalex120530-Jul-08 21:23 
AnswerRe: PerfMon CPU Usage not same as Task Manager reading Pin
Simon P Stevens30-Jul-08 22:53
MemberSimon P Stevens30-Jul-08 22:53 
GeneralRe: PerfMon CPU Usage not same as Task Manager reading Pin
alex12057-Aug-08 19:39
Memberalex12057-Aug-08 19:39 

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.