locked
Add button grayed out in local database cache wizard RRS feed

  • Question

  •  

    When I try to use the "Add Item/Add Local Database Cache" wizard the add button is grayed out.  Why is this so?  How do I fix it?

     

     

    • Moved by Hengzhe Li Friday, April 22, 2011 7:45 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Saturday, November 29, 2008 9:23 PM

Answers

  • Hi David,

     

    I am using SQL Express 2005 and SQL CE 3.5 SP1 and this setup is working for me. Here are a couple of problems I had when I was trying to use the Local Database Cache wizard.

     

    1. The SQL CE 3.5 SP1 components and development tools are installed with Visual Studio 2008 SP1. I did not know this so I downloaded and installed the SQL CE 3.5 SP1 components separately. After installing them nothing worked. After reading I determined that these components were already installed on my system with VS2008 SP1. To get things working I had to re-install the development tools off the VS2008 CD and then re-installed VS2008 SP1. Prior to doing this I would receive a message stating that VS2008 was unable to retrieve the requested data from any SQL CE database I attempted to browse with the server explorer in VS2008.

     

    2. Once I got that part of it working then I attempted to run the Local Database Cache wizard. I created a test database named "TestDB" using SQL Management Studio Express in my local SQL Express 2005 server on my windows XP pro machine. This is the same machine I am running VS2008 on. I added one table named "Table_1" and added one column named "Col1" of datatype INT. I started the wizard and created a new connection to my local SQL Express instance, database TestDB. But the ADD button on the wizard remained grayed out. I modified col1 on my table to be an identity column, but the ADD button was still grayed out. Then I right clicked on the column and selected primary key. After this I re-ran the wizard and the ADD button started working.

     

    If you did not specifically set one column on your table to be a primary key then the wizard will not add the table to the ADD list and the ADD button will be grayed out.

     

    This may be a different cause that results in the same problem you are having, but maybe it will give you some ideas.

     

    Best of luck.

     

    Tom

    Tuesday, December 2, 2008 7:14 PM

All replies

  • Hey David,

     

    I had the same problem. I finally determined that if you tables don't have a primary key then they will not show up in the add list. Add a primary key to atleast one table and that should fix your problem.

     

    Good luck.

     

    Tuesday, December 2, 2008 12:45 AM
  •  

    Thank you for the response.  All of my tables have identy columns which are primary keys.  After further debugging, I am leaning toward thinking this is an issue caused by the fact my SQL Server is SQLServer 2005 Service Pack 2, and my Compact Edition Server is 3.5.  When I debug, I get an error saying the file is corrupted and that it may be from a previous or later version of SQL Server.  I am not sure what the solution is, but I am going to try installing SQLServer 2008.

     

    David

    Tuesday, December 2, 2008 4:34 AM
  • Hi David,

     

    I am using SQL Express 2005 and SQL CE 3.5 SP1 and this setup is working for me. Here are a couple of problems I had when I was trying to use the Local Database Cache wizard.

     

    1. The SQL CE 3.5 SP1 components and development tools are installed with Visual Studio 2008 SP1. I did not know this so I downloaded and installed the SQL CE 3.5 SP1 components separately. After installing them nothing worked. After reading I determined that these components were already installed on my system with VS2008 SP1. To get things working I had to re-install the development tools off the VS2008 CD and then re-installed VS2008 SP1. Prior to doing this I would receive a message stating that VS2008 was unable to retrieve the requested data from any SQL CE database I attempted to browse with the server explorer in VS2008.

     

    2. Once I got that part of it working then I attempted to run the Local Database Cache wizard. I created a test database named "TestDB" using SQL Management Studio Express in my local SQL Express 2005 server on my windows XP pro machine. This is the same machine I am running VS2008 on. I added one table named "Table_1" and added one column named "Col1" of datatype INT. I started the wizard and created a new connection to my local SQL Express instance, database TestDB. But the ADD button on the wizard remained grayed out. I modified col1 on my table to be an identity column, but the ADD button was still grayed out. Then I right clicked on the column and selected primary key. After this I re-ran the wizard and the ADD button started working.

     

    If you did not specifically set one column on your table to be a primary key then the wizard will not add the table to the ADD list and the ADD button will be grayed out.

     

    This may be a different cause that results in the same problem you are having, but maybe it will give you some ideas.

     

    Best of luck.

     

    Tom

    Tuesday, December 2, 2008 7:14 PM
  • Thank you for the response.  I had done the same as you and installed the SQL CE 3.5 SP1 components separately.  I ended up uninstalling all of the VS and SQL Compact edition components and then reinstalling them and that worked.

     

    David

    Wednesday, December 3, 2008 6:06 PM
  • Hey David,

     

    I'm happy you got it figure out. Problems that get solved by un-installing and re-installing can be very frustrating.

     

     

    Kindest regards,

     

    Tom

     

    Wednesday, December 3, 2008 11:12 PM