I'm at a bit of a loss. I've got a MS Server development environment with VS 2010. When I run the application file on that, everything loads and works. I switch it over to my regular Windows 7 desktop and it stops. What's odd about this, I used the wizard to add the dataset. I changed the generated connection string slightly to look at the startup folder.
@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database.mdb"
I've got a manually coded connection string for a different form (the one that keeps crashing). When I set the readout, both are identical. But when I try to load the form that uses the manual string it gives me the "stopped working" error every single time. Adding to the frustration, I set a string to record a field from the database and it does in fact load the data, so apparently the form itself keeps crashing. I've checked and I do have the drivers for .NET and Access on both environments. I'm not sure what to do right now. Can anyone point me to what exceptions to throw and where/when to diagnose this? Or is it possible I'm lucky enough that I might just be missing a driver I don't know about? Ask anything and I'll answer, I'm not sure what info would help.
Immediate details that may be relevant
.NET 4.0 application written in C#
Access .mdb database
My function to load the data in the data access class, and all three lines of the popup are identical. It shows that, shows me the table data, then quits. But never on the dev computer. I copied the .exe and database to a new folder and
ran it stand-alone, the development environment works, the windows 7 does not.
public void fill_Table()
{
string folder = Convert.ToString(Path.Combine(Application.StartupPath, "database.mdb"));
this.connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database.mdb");
table.Clear();
OleDbDataAdapter da = new OleDbDataAdapter("Select * FROM table", connection);
da.Fill(table);
//MessageBox.Show(this.connection.ConnectionString.ToString() + '\n' + Properties.Settings.Default.myConnectionString + '\n' + folder);
}
May the fleas of a thousand camels feast happily on the lower regions of your enemies. And may their arms be too short to scratch!