Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
AnswerRe: Which Db connection is better? Pin
Rob Graham21-Oct-06 16:17
Rob Graham21-Oct-06 16:17 
AnswerRe: Which Db connection is better? Pin
Rob Graham21-Oct-06 16:21
Rob Graham21-Oct-06 16:21 
QuestionGetProcesses Error Pin
Inkyskin_UK21-Oct-06 12:50
Inkyskin_UK21-Oct-06 12:50 
AnswerRe: GetProcesses Error Pin
S. Senthil Kumar23-Oct-06 8:50
S. Senthil Kumar23-Oct-06 8:50 
QuestionReading VB6 PropertyBag using C#? Pin
marcel.toledo21-Oct-06 12:41
marcel.toledo21-Oct-06 12:41 
AnswerRe: Reading VB6 PropertyBag using C#? Pin
LongRange.Shooter23-Oct-06 4:30
LongRange.Shooter23-Oct-06 4:30 
QuestionMouse button click... Pin
new_phoenix21-Oct-06 11:19
new_phoenix21-Oct-06 11:19 
QuestionWhat's the meaning of the following code? Pin
Ming Luo21-Oct-06 10:46
Ming Luo21-Oct-06 10:46 
Hi all:
I am trying to write data back to the Access Database. The following method seems to work well. But I don't understand what the following piece of code exactly work.
<br />
public static void WriteToDatabase(string tableName)<br />
        {<br />
            System.Data.OleDb.OleDbDataAdapter<br />
               databaseAdapter = new OleDbDataAdapter("Select * from "+tableName, conn);<br />
            new OleDbCommandBuilder(databaseAdapter);<br />
            try<br />
            {<br />
                databaseAdapter.Update(ds, tableName);<br />
                ds.Tables[tableName].AcceptChanges();<br />
                MessageBox.Show("Congratulations");<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                MessageBox.Show(ex.Message);<br />
            }<br />
        }

Could anybody explain it to me please? Or maybe you can give me a better way to write data back to access database please?
Thank you very much



Asura

AnswerRe: What's the meaning of the following code? Pin
Tamimi - Code21-Oct-06 19:59
Tamimi - Code21-Oct-06 19:59 
QuestionHow to detect Attempt to connect? Pin
FlyOnIT21-Oct-06 9:52
FlyOnIT21-Oct-06 9:52 
AnswerRe: How to detect Attempt to connect? Pin
LongRange.Shooter23-Oct-06 4:32
LongRange.Shooter23-Oct-06 4:32 
QuestionNeed To license source or component. Pin
hdv21221-Oct-06 8:44
hdv21221-Oct-06 8:44 
QuestionHow to identify whether or not a control object has been instantiated... [modified] Pin
new_phoenix21-Oct-06 7:46
new_phoenix21-Oct-06 7:46 
AnswerRe: How to identify whether or not a control object has been instantiated... Pin
Guffa21-Oct-06 8:59
Guffa21-Oct-06 8:59 
GeneralRe: How to identify whether or not a control object has been instantiated... [modified] Pin
new_phoenix21-Oct-06 9:28
new_phoenix21-Oct-06 9:28 
GeneralRe: How to identify whether or not a control object has been instantiated... Pin
Guffa21-Oct-06 11:56
Guffa21-Oct-06 11:56 
QuestionForm Updating within Loops Pin
Jethro6321-Oct-06 6:06
Jethro6321-Oct-06 6:06 
AnswerRe: Form Updating within Loops Pin
User 665821-Oct-06 6:41
User 665821-Oct-06 6:41 
GeneralRe: Form Updating within Loops Pin
Jethro6321-Oct-06 19:19
Jethro6321-Oct-06 19:19 
QuestionHow to make an number only text box? Pin
Ming Luo21-Oct-06 5:50
Ming Luo21-Oct-06 5:50 
AnswerRe: How to make an number only text box? Pin
User 665821-Oct-06 6:44
User 665821-Oct-06 6:44 
AnswerRe: How to make an number only text box? Pin
3Dizard21-Oct-06 10:12
3Dizard21-Oct-06 10:12 
GeneralRe: How to make an number only text box? Pin
Martin2323-Oct-06 0:18
Martin2323-Oct-06 0:18 
Questionhow to Genarate report ??? Pin
iyoko21-Oct-06 5:38
iyoko21-Oct-06 5:38 
Questionhow retrieve data from Cookie?? Pin
iyoko21-Oct-06 5:36
iyoko21-Oct-06 5:36 

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.