Click here to Skip to main content
15,917,702 members
Home / Discussions / C#
   

C#

 
GeneralSearch & replacing values in Xml Pin
breen258-Jul-05 9:05
breen258-Jul-05 9:05 
GeneralMDI child can't close itself Pin
Luis Alonso Ramos8-Jul-05 9:00
Luis Alonso Ramos8-Jul-05 9:00 
GeneralRe: MDI child can't close itself Pin
Snowblind379-Jul-05 8:24
Snowblind379-Jul-05 8:24 
GeneralRe: MDI child can't close itself Pin
Luis Alonso Ramos9-Jul-05 9:54
Luis Alonso Ramos9-Jul-05 9:54 
GeneralRe: MDI child can't close itself Pin
Snowblind379-Jul-05 11:20
Snowblind379-Jul-05 11:20 
Questionbest way to connect to a database? Pin
Jassim Rahma8-Jul-05 7:32
Jassim Rahma8-Jul-05 7:32 
AnswerRe: best way to connect to a database? Pin
breen258-Jul-05 8:47
breen258-Jul-05 8:47 
GeneralSimple Instance Error Msg Pin
zaboboa8-Jul-05 5:32
zaboboa8-Jul-05 5:32 
I have a simple setup outlined below, but when I try to run it I get this message: Object reference not set to an instance of an object.
Why do I get this message, if I declare the dataset in the declaration
section of the class ProjectSetup

Here is the setup:

public class ProjectSetup : System.Windows.Forms.Form {
.
.
.
private DataSet dataset = new DataSet();

// Constructor
public ProjectSetup ()
{
.
.
PopulateLocationComboBox();
}

private void PopulateLocationComboBox ()
{
// Populate ComboBox
foreach (DataRow row in this.dataset.Tables["Location"].Rows)
{
string item = row["Name"].ToString();
this.comboBoxLocation.Items.Add(item);
} // End of FOREACH statement
}


private void ProjectSetup_Load(object sender, System.EventArgs e)
{
.
.
adapterLocation.Fill(dataset, "Location");
}
}

Error message occurs in PopulateLocationComboBox () in foreach statement
when I am trying to access the dataset.

Thank you.

GeneralRe: Simple Instance Error Msg Pin
Dave Kreskowiak8-Jul-05 5:42
mveDave Kreskowiak8-Jul-05 5:42 
GeneralRe: Simple Instance Error Msg Pin
Stefan Troschuetz8-Jul-05 5:51
Stefan Troschuetz8-Jul-05 5:51 
GeneralRe: Simple Instance Error Msg Pin
zaboboa8-Jul-05 6:14
zaboboa8-Jul-05 6:14 
GeneralRe: Simple Instance Error Msg Pin
Stefan Troschuetz8-Jul-05 9:40
Stefan Troschuetz8-Jul-05 9:40 
GeneralObject Inheritance Pin
heistgonewrong8-Jul-05 4:48
heistgonewrong8-Jul-05 4:48 
GeneralRe: Object Inheritance Pin
therealmccoy8-Jul-05 5:33
therealmccoy8-Jul-05 5:33 
GeneralRe: Object Inheritance Pin
S. Senthil Kumar8-Jul-05 5:46
S. Senthil Kumar8-Jul-05 5:46 
GeneralOut of Memory when I Drawing Pin
Alex Cutovoi8-Jul-05 4:21
Alex Cutovoi8-Jul-05 4:21 
GeneralRe: Out of Memory when I Drawing Pin
leppie8-Jul-05 4:24
leppie8-Jul-05 4:24 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi8-Jul-05 6:42
Alex Cutovoi8-Jul-05 6:42 
GeneralRe: Out of Memory when I Drawing Pin
leppie8-Jul-05 6:50
leppie8-Jul-05 6:50 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi8-Jul-05 9:54
Alex Cutovoi8-Jul-05 9:54 
GeneralRe: Out of Memory when I Drawing Pin
Guffa8-Jul-05 10:41
Guffa8-Jul-05 10:41 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi9-Jul-05 6:32
Alex Cutovoi9-Jul-05 6:32 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi9-Jul-05 6:32
Alex Cutovoi9-Jul-05 6:32 
GeneralS.M.A.R.T. Support Pin
bernardoh8-Jul-05 4:16
bernardoh8-Jul-05 4:16 
GeneralRe: S.M.A.R.T. Support Pin
leppie8-Jul-05 4:22
leppie8-Jul-05 4:22 

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.