Repost: Dataset problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Hazell

    #1

    Repost: Dataset problems

    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 "Unspecifie d 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

  • Miha Markic

    #2
    Re: Repost: Dataset problems

    Hi Martin,

    I guess designer has problems.
    What happens if you create a new form and place a dataset on it?

    --
    Miha Markic - RightHand .NET consulting & software development
    miha at rthand com

    "Martin Hazell" <martin.hazell@ toomuchspam.iom creameres.com> wrote in
    message news:05f701c3b7 eb$c2afbb00$a10 1280a@phx.gbl.. .[color=blue]
    > 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 "Unspecifie d 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
    >[/color]


    Comment

    • Martin Hazell

      #3
      Re: Repost: Dataset problems

      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 "Unspecifie d Errors" on the new form.

      Thanks

      Martin

      [color=blue]
      >-----Original Message-----
      >Hi Martin,
      >
      >I guess designer has problems.
      >What happens if you create a new form and place a[/color]
      dataset on it?[color=blue]
      >
      >--
      >Miha Markic - RightHand .NET consulting & software[/color]
      development[color=blue]
      >miha at rthand com
      >
      >"Martin Hazell"[/color]
      <martin.hazell@ toomuchspam.iom creameres.com> wrote in[color=blue]
      >message news:05f701c3b7 eb$c2afbb00$a10 1280a@phx.gbl.. .[color=green]
      >> 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[/color][/color]
      fill[color=blue][color=green]
      >> a table was not initialised.
      >>
      >> I opened the form and I noticed that all of the[/color][/color]
      datasets[color=blue][color=green]
      >> that I had in the designer had dissapeared!!! I then
      >> tried to recreate them through the dataadapter, but I
      >> just kept getting "Unspecifie d 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,[/color][/color]
      but[color=blue][color=green]
      >> 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
      >>[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Miha Markic

        #4
        Re: Repost: Dataset problems

        Are datasets in the same project?
        Also, try deleting obj and bin folders.

        --
        Miha Markic - RightHand .NET consulting & software development
        miha at rthand com

        "Martin Hazell" <martin.hazell@ toomuchspam.iom creameres.com> wrote in
        message news:063001c3b7 f7$29c7a220$a50 1280a@phx.gbl.. .[color=blue]
        > 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 "Unspecifie d Errors" on the new form.
        >
        > Thanks
        >
        > Martin
        >
        >[color=green]
        > >-----Original Message-----
        > >Hi Martin,
        > >
        > >I guess designer has problems.
        > >What happens if you create a new form and place a[/color]
        > dataset on it?[color=green]
        > >
        > >--
        > >Miha Markic - RightHand .NET consulting & software[/color]
        > development[color=green]
        > >miha at rthand com
        > >
        > >"Martin Hazell"[/color]
        > <martin.hazell@ toomuchspam.iom creameres.com> wrote in[color=green]
        > >message news:05f701c3b7 eb$c2afbb00$a10 1280a@phx.gbl.. .[color=darkred]
        > >> 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[/color][/color]
        > fill[color=green][color=darkred]
        > >> a table was not initialised.
        > >>
        > >> I opened the form and I noticed that all of the[/color][/color]
        > datasets[color=green][color=darkred]
        > >> that I had in the designer had dissapeared!!! I then
        > >> tried to recreate them through the dataadapter, but I
        > >> just kept getting "Unspecifie d 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,[/color][/color]
        > but[color=green][color=darkred]
        > >> 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
        > >>[/color]
        > >
        > >
        > >.
        > >[/color][/color]


        Comment

        • Martin Hazell

          #5
          Re: Repost: Dataset problems

          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

          [color=blue]
          >-----Original Message-----
          >Are datasets in the same project?
          >Also, try deleting obj and bin folders.
          >
          >--
          >Miha Markic - RightHand .NET consulting & software[/color]
          development[color=blue]
          >miha at rthand com
          >
          >"Martin Hazell"[/color]
          <martin.hazell@ toomuchspam.iom creameres.com> wrote in[color=blue]
          >message news:063001c3b7 f7$29c7a220$a50 1280a@phx.gbl.. .[color=green]
          >> The designer will allow me to create a new form, add[/color][/color]
          some[color=blue][color=green]
          >> datasets, and will work fine! The next time I open[/color][/color]
          that[color=blue][color=green]
          >> form, those datasets have gone, and I start
          >> getting "Unspecifie d Errors" on the new form.
          >>
          >> Thanks
          >>
          >> Martin
          >>
          >>[color=darkred]
          >> >-----Original Message-----
          >> >Hi Martin,
          >> >
          >> >I guess designer has problems.
          >> >What happens if you create a new form and place a[/color]
          >> dataset on it?[color=darkred]
          >> >
          >> >--
          >> >Miha Markic - RightHand .NET consulting & software[/color]
          >> development[color=darkred]
          >> >miha at rthand com
          >> >
          >> >"Martin Hazell"[/color]
          >> <martin.hazell@ toomuchspam.iom creameres.com> wrote in[color=darkred]
          >> >message news:05f701c3b7 eb$c2afbb00$a10 1280a@phx.gbl.. .
          >> >> I have had a form within a project that has been[/color][/color][/color]
          tested[color=blue][color=green][color=darkred]
          >> >> and working for the past 4-5 months. The other[/color][/color][/color]
          day, I[color=blue][color=green][color=darkred]
          >> >> decided to change all of my database connection[/color][/color][/color]
          strings[color=blue][color=green][color=darkred]
          >> >> into a dynamic property for a few reasons.
          >> >>
          >> >> All was OK until testing a particular form, and I[/color][/color][/color]
          got a[color=blue][color=green][color=darkred]
          >> >> strange error when opening it whilst running, and I[/color][/color][/color]
          got[color=blue][color=green][color=darkred]
          >> >> an exception stating that the dataset I was using to[/color]
          >> fill[color=darkred]
          >> >> a table was not initialised.
          >> >>
          >> >> I opened the form and I noticed that all of the[/color]
          >> datasets[color=darkred]
          >> >> that I had in the designer had dissapeared!!! I then
          >> >> tried to recreate them through the dataadapter, but[/color][/color][/color]
          I[color=blue][color=green][color=darkred]
          >> >> just kept getting "Unspecifie d Error". I changed[/color][/color][/color]
          the[color=blue][color=green][color=darkred]
          >> >> connection string back from a dynamic property into[/color][/color][/color]
          the[color=blue][color=green][color=darkred]
          >> >> string it originally was and it still didn't work.
          >> >>
          >> >> The named datasets still appear on in the code page,[/color]
          >> but[color=darkred]
          >> >> they do not appear within the "Windows Forms" code[/color][/color][/color]
          run[color=blue][color=green][color=darkred]
          >> >> when initialising.
          >> >>
          >> >> Bringing a form in from a backup still doesn't seem[/color][/color][/color]
          to[color=blue][color=green][color=darkred]
          >> >> work either!
          >> >>
          >> >> Thanks
          >> >>
          >> >> Martin
          >> >>
          >> >
          >> >
          >> >.
          >> >[/color][/color]
          >
          >
          >.
          >[/color]

          Comment

          • Jeffrey Tan[MSFT]

            #6
            RE: Repost: Dataset problems


            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.

            Comment

            • Jeffrey Tan[MSFT]

              #7
              Re: Repost: Dataset problems


              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.

              Comment

              • Martin Hazell

                #8
                RE: Repost: Dataset problems

                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

                [color=blue]
                >-----Original Message-----
                >
                >Hi Martin,
                >
                >This can happen when your conenction String is not[/color]
                properly made or there[color=blue]
                >is some error in the SQL Command. You must check for[/color]
                Connection string[color=blue]
                >whether you are logged in as NT Authentication or SQL[/color]
                Authentication.[color=blue]
                >
                >Best regards,
                >Jeffrey Tan
                >Microsoft Online Partner Support
                >Get Secure! - www.microsoft.com/security
                >This posting is provided "as is" with no warranties and[/color]
                confers no rights.[color=blue]
                >
                >.
                >[/color]

                Comment

                Working...