Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Sep 2004
    Location
    Sacramento, California, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exceptions (Visual Studio.NET 2003)

    When I run my windows form connected to a SQL Server database I get this error:

    An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

    Additional information: System error.

    When I click on help it gives some information about adding new Exceptions. I added the 2 exceptions for Control-C and Control-Break under Win32. Still will not run the form. If I right-click on the form and select Preview Dataset I am able to Preview the Dataset.

    the line of code highlighted is:
    SqlDataAdapter1.Fill(DsEmployees1)

    I am new to ADO.Net so any suggestions would be appreciated.

    Carla

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Exceptions (Visual Studio.NET 2003)

    Carla,

    Can you post the code you're using - starting with the creation of your ADO objects, all the way to the Fill method you included below.

    Also, I'm not sure what you mean by this:
    >> I added the 2 exceptions for Control-C and Control-Break under Win32.

    Hopefully, your code will clarify this.

  3. #3
    4 Star Lounger
    Join Date
    Sep 2004
    Location
    Sacramento, California, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Exceptions (Visual Studio.NET 2003)

    Mark,

    I have attached a Word document with all of the code.

    When I get this error I looked out at the knowledge base keyword Exceptions and the instructions said to go to Debug, Exceptiions and look for anything with a red X. I saw 2 under Win32 and instructions said to type the exception number and name and add. The red X's dissappeared, but the form will still not run.

    Any help is appreciated.

    Carla

  4. #4
    4 Star Lounger
    Join Date
    Sep 2004
    Location
    Sacramento, California, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Exceptions (Visual Studio.NET 2003)

    Mark,

    I found my answer after a lot of trial and error. I noticed when I previewed the dataset I was prompted for my SQL Server login. In the connection object I only had my userid listed. I added password to the connection string and it worked.

    Carla

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •