Results 1 to 5 of 5

Thread: How can I remove DBconnection which shouldn't exit?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2016
    Posts
    255

    How can I remove DBconnection which shouldn't exit?

    Hi,

    When I start a project a data connection is loaded and closed which should not exist anymore.
    The PPS04a.accdb is not used anymore and I could not find a place where it is referenced. All data is retrieved from PPS_047.accdb. If I remove the unwanted db from its directory VB does not launch the program. In settings there is only the correct connection.
    I can't find out how to remove it.
    Name:  DBconnection.jpg
Views: 214
Size:  23.5 KBName:  DBsettings.jpg
Views: 193
Size:  39.0 KB

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: How can I remove DBconnection which shouldn't exit?

    If the application fails to launch then I would expect that an exception is thrown. You should find out what that exception is.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2016
    Posts
    255

    Re: How can I remove DBconnection which shouldn't exit?

    Obviously, the problem occurs before the form is loaded. Is there a way to catch an early exception, lets say right after the 'main' program, if this exist (I could not find it)?

  4. #4
    Junior Member
    Join Date
    May 2012
    Posts
    28

    Re: How can I remove DBconnection which shouldn't exit?

    Quote Originally Posted by smktec View Post
    Obviously, the problem occurs before the form is loaded. Is there a way to catch an early exception, lets say right after the 'main' program, if this exist (I could not find it)?
    You indicate that "VB does not launch the program". Does the app crash? Does it ever start? You could check the Windows Event log if this is the case.
    I would remove any Data Sources from the project that are using this connection (Solution Explorer) if it's not in use. If it's in use somewhere then you should encounter a build error. Did you verify that no errors occurred when you ran the build?
    Paul ~~~~ Microsoft MVP (Visual Basic)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2016
    Posts
    255

    Re: How can I remove DBconnection which shouldn't exit?

    I noticed that the unneeded db PPS04a was present in the db explorer. Because I only used the database sources windows I didn't see it. But it was displayed after launching the project, which give me the impression that it suddenly appeared. So I simply had to delete the PPS04a in the db explorer and the whole problem had disappeared.

Posting Permissions

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



Click Here to Expand Forum to Full Width