none
How do you set the LocalConnectionString Max Database Size property on the RDA object in C++?

    Question

  • How do you set the LocalConnectionString Max Database Size property on the RDA object in C++?

    We have an C++ application running under PPC 2003. The SQL Server Compact edition 3.5 service pack 2 is installed.

    We have successfully created a local database using the DBPROP_SSCE_MAX_DATABASE_SIZE property and set the size to 386mb.

    The local database can be written locally to up to the Max Database Size.

    When we perform a Pull operation with the RDA object the Pull fails when we set the Max Database Size property on the RDA LocalConectionString.

    When we perform a Pull operation with the RDA object the Pull succeeds when we set only the Data Source property. But we can only Pull up to 128mb (the default size).

     Code:(abbreviated)

     ISSCERDA* m_CERDA; //RDA

     WCHAR tempBuf[MAX_QUERYSTRING];

     CString szLocalDB = _T("\\SDMMC Disk\\Test.sdf");

    CString HttpServer = _T("http://10.10.10.88/II2_IIS/sqlcesa35.dll");

    _bstr_t bstrErrorTable = "";

    _bstr_t  bstrSqlSelect = "Select * PropertyDetails";

    _bstr_t  bstroleDBConnSting = "Provider=SQLOLEDB;Data Source=VSQL01\\NY;Persist Security Info=True;Password=sql;User ID=MobileUser;Initial Catalog=PropertySite";

     CoCreateInstance(CLSID_RemoteDataAccess, NULL, CLSCTX_INPROC_SERVER, IID_ISSCERDA, (LPVOID *)&m_CERDA);

     wsprintf(tempBuf,L"%s",HttpServer);

    m_CERDA->put_InternetURL(tempBuf);  

     //When We use this local connection string the tables are pulled sucessfully up to 128mb

    //wsprintf(tempBuf,_T("Data Source=%s"),szLocalDB);

    //When We use this local connection string no tables are pulled

    wsprintf(tempBuf,_T("Data Source='%s' ;SSCE:Max Database Size=386;") ,szLocalDB);

    m_CERDA->put_LocalConnectionString(tempBuf);

    m_CERDA->Pull(bstrLocalTblName,bstrSqlSelectHH,bstroleDBConnSting,TRACKINGOFF,bstrErrorTable);

    Tuesday, November 16, 2010 7:20 PM

All replies

  • It may be a limitation of RDA, there have been other issues with breaking the 128 MB barrier.
    Visit my SQL Compact blog - http://erikej.blogspot.com - Please mark as answer, if this was it.
    Friday, November 26, 2010 1:34 PM