Repost: Dataset problems

  • Thread starter Thread starter Martin Hazell
  • Start date Start date
M

Martin Hazell

I have had a form within a project that has been tested
and working for the past 4-5 months. The other day, I
decided to change all of my database connection strings
into a dynamic property for a few reasons.

All was OK until testing a particular form, and I got a
strange error when opening it whilst running, and I got
an exception stating that the dataset I was using to fill
a table was not initialised.

I opened the form and I noticed that all of the datasets
that I had in the designer had dissapeared!!! I then
tried to recreate them through the dataadapter, but I
just kept getting "Unspecified Error". I changed the
connection string back from a dynamic property into the
string it originally was and it still didn't work.

The named datasets still appear on in the code page, but
they do not appear within the "Windows Forms" code run
when initialising.

Bringing a form in from a backup still doesn't seem to
work either!

Thanks

Martin
 
Hi Martin,

I guess designer has problems.
What happens if you create a new form and place a dataset on it?
 
The designer will allow me to create a new form, add some
datasets, and will work fine! The next time I open that
form, those datasets have gone, and I start
getting "Unspecified Errors" on the new form.

Thanks

Martin
 
I have deleted the obj and bin folders, and it has let me
recreate the datasets fine - and it also hasn't deleted
them on me either.

Thanks

Martin
 
Hi Martin,

This can happen when your conenction String is not properly made or there
is some error in the SQL Command. You must check for Connection string
whether you are logged in as NT Authentication or SQL Authentication.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
If you create a project, manipulate your dataset and data in the new
project, does the error still generate?

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi,

Thanks - I think that is what originally caused the
problem, but resetting it did not solve it.

I have managed to fix this error by deleting the obj and
bin files (see Miha Markic's reply for more details) and
this has cured the problem.

Many thanks for your help

Martin
 
Back
Top