Results 1 to 8 of 8

Thread: Project takes forever to save

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2015
    Location
    Connecticut, USA
    Posts
    147

    Project takes forever to save

    I have a new project that's a simple one form database experiment and it's taking a ridiculously long time to save or build. Like, two minutes. Visual Studio even displays (Not Responding) in the title bar. The problem seems to be associated with the data controls - the slow response started when I added OleDbDataAdapter and OleDbConnection.

    Anything I do in the design pane will take forever on save. If I add a button to the form and double click on it, it takes over 2 minutes before getting to the code view screen.

    This is a 64 bit 3.4 GHz machine. No other projects behave this way.

    Anybody have ideas?

    Thanks.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Project takes forever to save

    That is not normal behavior, as you probably expected. The items you mention have never caused any problem for me. However, since you are talking about a database project, are you copying the database every time you save? Depending on the size of the DB, that could take a long time. The only other alternative that I can see is that something is corrupted about the project. Deleting the Bin and Obj folders (which will cause them to be recreated the next time) may solve that.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2015
    Location
    Connecticut, USA
    Posts
    147

    Re: Project takes forever to save

    Database is a small .mdb, less than a meg, and I'm not copying. I deleted those 2 directories and no change.

    It's OK when working within the code window - I can add / change code and build / run normally. But do anything on the design, like add or delete a button, and switch back to the code window takes 2 minutes.

    This is driving me nuts. There are lots of other projects bigger than this one in my system and none have this problem.

  4. #4
    PowerPoster
    Join Date
    Oct 2010
    Posts
    2,141

    Re: Project takes forever to save

    The pause is the code generators updating the form.designer.vb file. However that should be quick. Are you using any third party (not written by MS) components of the form?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2015
    Location
    Connecticut, USA
    Posts
    147

    Re: Project takes forever to save

    No 3rd party components.

    I've narrowed this down to the existence of an OleDbDataAdapter control on the form. Simply placing the control on my form causes the system to go off and "do something" every time I modify the form or one of its control properties. The referenced data connection is a simple Access MDB file on my local hard drive. I have no idea what Visual Studio is up to.

    I've copied the project and mdb to my coworker's system and it behaves the same on his machine. Deleting the data adapter makes the system respond normally. This is very odd.

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: Project takes forever to save

    It is odd, but do you need to put an OleDBDataAdapter on the form? I didn't even know you COULD do that for the simple reason that I've never had a reason to do so. If you were to create a DataAdapter in code, does it cause the same behavior?
    My usual boring signature: Nothing

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Apr 2015
    Location
    Connecticut, USA
    Posts
    147

    Re: Project takes forever to save

    Quote Originally Posted by Shaggy Hiker View Post
    It is odd, but do you need to put an OleDBDataAdapter on the form? I didn't even know you COULD do that for the simple reason that I've never had a reason to do so. If you were to create a DataAdapter in code, does it cause the same behavior?
    Following one of the tutorials I found online, the procedure is to place the data adapter on the form first. You get prompted to specify the data connection and an OleDbConnection is created automatically. Then through the adapter properties you create a dataset which in turn creates a dataset binding source. It's all pretty much automated.

    I have deleted the data adapter control from the form and am trying to implement it in code. The long save/build time has gone away. Unfortunately, I'm unfamiliar with the methods and properties of these data objects. I would prefer to have full control in my code, as I'm eventually going to replace the Access database with a networked SQL Server and would like to make as few changes as possible. I'm comfortable using SQL commands if I can just figure out how to send them and get a response.

    If you know of any good online resources that'd help with that I'd appreciate a link.

    Thanks.

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: Project takes forever to save

    Our Database Development FAQs/Tutorials (at the top of the Database Development forum) has several useful links.

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