locked
The specified table does not exist. [ <tablename>]? RRS feed

  • Question

  • Hi I'm using Vista, and trying to use merge with SQL 2005 and CE 3.5

     

    Using the tutorial on MSDN, http://msdn.microsoft.com/en-us/library/aa454892.aspx, when I try to call

    the follow Fill() method I get 'The specified table does not exist. [ Company ]'

     

    public virtual int Fill(CompaniesDataSet.CompanyDataTable dataTable) {

    this.Adapter.SelectCommand = this.CommandCollection[0];

    if ((this.ClearBeforeFill == true)) {

    dataTable.Clear();

    }

    int returnValue = this.Adapter.Fill(dataTable); <---ERROR OCCURS HERE

    return returnValue;

    }

     

    For the SqlCeReplication object I have the following:

     

    _repl.InternetUrl = @"http://192.168.2.3/Sync/sqlcesa35.dll";

    _repl.Publisher = @"http://192.168.2.3";

    _repl.PublisherDatabase = @"MyCompanyDatabase";

    _repl.PublisherSecurityMode = SecurityType.NTAuthentication;

    _repl.Publication = @"MyCompanyDatabaseMobile";

    _repl.Subscriber = @"MyCompanyDatabaseMobile";

    _repl.SubscriberConnectionString = this.DataSourceConnectionString;

     

    I'm able to connect my emulator to my desktop when I type http://192.168.2.3/Sync/sqlcesa35.dll which returns "Microsoft SQL Server Compact Server Agent".

     

    Is there anything I can do to check that the publication snapshot is OK or invalid? Any thoughts would be appreciated.

     

    Thursday, October 30, 2008 1:56 AM

Answers

  • I ended up connecting to the device emulator, navigating to the Program Files and deleting the .exe and .sdf that I had previously deployed.  When I debugged the project in VS, it re-deployed the new .exe and .sdf and it worked fine.

     

    I'm not sure why the .sdf was not re-deployed over an existing one or if I can set it to do so.

    Thursday, October 30, 2008 6:51 PM

All replies

  • And the Company table is included in your Merge Publication?

     

    Thursday, October 30, 2008 2:36 AM
  • Yea, sounds like the Company table isn't in your database or isn't set as one of your your replication articles.

     

    Vince

    Thursday, October 30, 2008 6:45 AM
  • Guys, Do you know how I can validate my publication to make sure it contains the company table?

     

    I thought I created everything OK.  I created a publication under the Replication\Local Publication folder in SSMS which seemed to have put the publication in C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sync\SQL\ReplicationData3_5\unc\<devmachinename>_<database>_<publicationname>\20081030122694

     

    ReplicationData3_5 is the share I have configured.  I'm not sure why is naming my files with _2.  Could that be part of the problem?

     

    In the '20081030122694' folder I have the following listed.

    10/30/2008  12:26 PM           186,326 Company_2.bcp
    10/30/2008  12:26 PM             2,146 Company_2.cft
    10/30/2008  12:26 PM               208 Company_2.dri
    10/30/2008  12:26 PM           596,488 Company_2.prc
    10/30/2008  12:26 PM             1,260 Company_2.sch
    10/30/2008  12:26 PM                62 Company_2.trg
    10/30/2008  12:26 PM                 0 MSmerge_contents90_forall.bcp
    10/30/2008  12:26 PM               390 MSmerge_genhistory90.bcp
    10/30/2008  12:26 PM                 0 MSmerge_rowtrack90.bcp
    10/30/2008  12:26 PM                 0 MSmerge_tombstone.bcp
    10/30/2008  12:26 PM                 0 sysmergesubsetfilters90.bcp

     

     

     

     

    Thursday, October 30, 2008 4:36 PM
  • I ended up connecting to the device emulator, navigating to the Program Files and deleting the .exe and .sdf that I had previously deployed.  When I debugged the project in VS, it re-deployed the new .exe and .sdf and it worked fine.

     

    I'm not sure why the .sdf was not re-deployed over an existing one or if I can set it to do so.

    Thursday, October 30, 2008 6:51 PM