When I try to update a dataset I get an error that the system is unable to find ‘Table’?
Are you calling Update on the dataset like this without specifying the name of the table that you are updating. The problem is that when table names are not given the system assumes a table name of ’Table’. This of course causes the update to fail. this.dataAdapter.Update(this.dataSet); If so just change this line to this.dataAdapter.Update(this.dataSet, ‘Customers’); // replace ’Customers’ with the table that you have
What is a DataSet?
Think of a DataSet object as a local in memory copy of database tables. With the client server model, client applications held onto a connection and updated and added records at will. With ADO.NET the dataset presents a disconnected model. Data as well as data changes are contained in the dataset with no physical connection to the datasource. Changes can be reconciled against any datasource at any time. A Dataset is not limited to database tables. It can work with XML or for that matter any other data.
How do I change my application’s icon
In the Solution Explorer window, you’ll see a file called app.ico in your project. This file contains your application icon. You can change this to a different file in the project properties screen which you see by right-clicking the project node in the Solution Explorer, and selecting Properties..
How do I use the OpenFileDialog
using System.Text; using System.IO; …. private void button1_Click(object sender, System.EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = ‘Open text file’ ; dlg.InitialDirectory = @’c:\’ ; dlg.Filter = ‘txt files (*.txt)|*.txt|All files (*.*)|*.*’ ; if(dlg.ShowDialog() == DialogResult.OK) { StreamReader sr = File.OpenText(dlg.FileName); string s = sr.ReadLine(); StringBuilder sb = new StringBuilder(); while (s != null) { sb.Append(s); s = sr.ReadLine(); } sr.Close(); textBox1.Text = sb.ToString(); } }
How do I make my textbox use all upper (or lower) case characters
Use the CharacterCasing property of the TextBox. textBox1.CharacterCasing = CharacterCasing.Upper; // textBox1.CharacterCasing = CharacterCasing.Lower;