Click here to Skip to main content
15,913,264 members
Home / Discussions / C#
   

C#

 
GeneralRe: relation between mouse event and showintaskbar Pin
yu-yu25-Oct-04 14:36
yu-yu25-Oct-04 14:36 
GeneralRe: relation between mouse event and showintaskbar Pin
Dave Kreskowiak25-Oct-04 14:59
mveDave Kreskowiak25-Oct-04 14:59 
GeneralRe: relation between mouse event and showintaskbar Pin
yu-yu25-Oct-04 15:14
yu-yu25-Oct-04 15:14 
GeneralUpdating the client form Pin
Anonymous24-Oct-04 15:56
Anonymous24-Oct-04 15:56 
GeneralRe: Updating the client form Pin
Alex Korchemniy24-Oct-04 18:52
Alex Korchemniy24-Oct-04 18:52 
GeneralTextBox property limitation Pin
sachinkalse24-Oct-04 15:14
sachinkalse24-Oct-04 15:14 
GeneralRe: TextBox property limitation Pin
Alex Korchemniy24-Oct-04 18:26
Alex Korchemniy24-Oct-04 18:26 
Generalbest way to update a database Pin
steve_rm24-Oct-04 6:36
steve_rm24-Oct-04 6:36 
Hello,

I have a database application and have been experiencing problems adding, updating, and deleting using the data table.
Is there a more efficient and robust way to do this. My code l have used is listed below. Someone told me it is better to use the dataset rather than the datatable. If this is so would it be possible to convert the below code to using the dataset. I am not sure on how to use the syntax.

cnnTeacher.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\IBS Library System\LibrarySystem.mdb;Persist Security Info=False";		<br />
				OleDbDataAdapter daTeacher = new OleDbDataAdapter("SELECT * FROM Teacher",cnnTeacher);<br />
				OleDbCommandBuilder cbTeacher = new OleDbCommandBuilder(daTeacher);<br />
				daTeacher.Fill(dtTeacher);<br />
			<br />
				DataRow drNewTeacher = dtTeacher.NewRow();<br />
<br />
				drNewTeacher["TeacherID"] = txtAddIDNumber.Text;<br />
				drNewTeacher["FirstName"] = txtAddFirstName.Text;<br />
				drNewTeacher["LastName"] = txtAddLastName.Text;<br />
				drNewTeacher["E-mail"] = txtAddEmail.Text;<br />
<br />
				dtTeacher.Rows.Add(drNewTeacher);<br />
				daTeacher.Update(dtTeacher); //Error - Syntax error in INSERT INTO


Many thanks in advance,

Steve
GeneralClientTime Information Pin
gupta vaibhav24-Oct-04 6:23
gupta vaibhav24-Oct-04 6:23 
GeneralRe: ClientTime Information Pin
J4amieC24-Oct-04 21:44
J4amieC24-Oct-04 21:44 
GeneralRe: ClientTime Information Pin
Salil Khedkar24-Oct-04 23:03
Salil Khedkar24-Oct-04 23:03 
GeneralTurn Off Scrollbars on .NET DataGrid Pin
MarkMokris24-Oct-04 6:10
MarkMokris24-Oct-04 6:10 
GeneralRe: Turn Off Scrollbars on .NET DataGrid Pin
Alex Korchemniy24-Oct-04 9:41
Alex Korchemniy24-Oct-04 9:41 
GeneralRichTextBox Scrolling Pin
WilsonProgramming24-Oct-04 5:59
WilsonProgramming24-Oct-04 5:59 
GeneralRe: RichTextBox Scrolling Pin
WilsonProgramming25-Oct-04 5:58
WilsonProgramming25-Oct-04 5:58 
QuestionHow to use Universal Link Data (C#)? Pin
Miri Ofir24-Oct-04 5:37
Miri Ofir24-Oct-04 5:37 
AnswerRe: How to use Universal Link Data (C#)? Pin
Nick Parker24-Oct-04 6:17
protectorNick Parker24-Oct-04 6:17 
GeneralRe: How to use Universal Link Data (C#)? Pin
Miri Ofir24-Oct-04 6:28
Miri Ofir24-Oct-04 6:28 
GeneralRe: How to use Universal Link Data (C#)? Pin
Alex Korchemniy24-Oct-04 10:26
Alex Korchemniy24-Oct-04 10:26 
GeneralRe: How to use Universal Link Data (C#)? Pin
Miri Ofir25-Oct-04 1:51
Miri Ofir25-Oct-04 1:51 
Generalwhen to use Point to screen Pin
yonitgil24-Oct-04 3:18
yonitgil24-Oct-04 3:18 
GeneralRe: when to use Point to screen Pin
Nick Parker24-Oct-04 3:30
protectorNick Parker24-Oct-04 3:30 
GeneralRe: when to use Point to screen Pin
yonitgil24-Oct-04 4:43
yonitgil24-Oct-04 4:43 
GeneralEditing a winforms DataGrid Pin
bartwinsimpson23-Oct-04 22:01
bartwinsimpson23-Oct-04 22:01 
GeneralRe: Editing a winforms DataGrid Pin
Ghazi H. Wadi24-Oct-04 0:49
Ghazi H. Wadi24-Oct-04 0:49 

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.