Showing posts with label mobile. Show all posts
Showing posts with label mobile. Show all posts

Wednesday, March 7, 2012

Compact Tools Download Problem

When I try and download Sqlce30setupen.msi from the msdn site, I keep getting the install for the mobile tools. Can someone explain why this is happening. I am new to SQL compact and I am trying to go through the tutorial http://msdn2.microsoft.com/en-us/library/bb226707.aspx. This tutorial says the download should be for SQL Compact setup.

Thanks

Ryan

All downloads for SQL Compact Edition are available from http://www.microsoft.com/sql/editions/compact/downloads.mspx|||

Hi Ryan,

Are you having the same problem as me? When I download the setup file from the SQL Compact downloads url provided, it doesn't install the Compac Server Tools but tries to install "Microsoft SQL Server 2005 Mobile SP1 [ENU] Server Tools". I'm trying to install on Windows Server 2003. Interestingly if I run the same file on XP Pro it successfully installs the Compact Server Tools. I just added a new thread about this problem.

Regards,

Greg

Compact Tools Download Problem

When I try and download Sqlce30setupen.msi from the msdn site, I keep getting the install for the mobile tools. Can someone explain why this is happening. I am new to SQL compact and I am trying to go through the tutorial http://msdn2.microsoft.com/en-us/library/bb226707.aspx. This tutorial says the download should be for SQL Compact setup.

Thanks

Ryan

All downloads for SQL Compact Edition are available from http://www.microsoft.com/sql/editions/compact/downloads.mspx|||

Hi Ryan,

Are you having the same problem as me? When I download the setup file from the SQL Compact downloads url provided, it doesn't install the Compac Server Tools but tries to install "Microsoft SQL Server 2005 Mobile SP1 [ENU] Server Tools". I'm trying to install on Windows Server 2003. Interestingly if I run the same file on XP Pro it successfully installs the Compact Server Tools. I just added a new thread about this problem.

Regards,

Greg

Compact Sql Mobile 3.0 DataBase in C++/OLE DB ?

Hello,

I'm porting my C++ (EVC3) application from Sql CE 2.0 to Sql Mobile 3.0

(with OLE DB). To compact a 2.0 database, i used ISSCECompact interface.

But it doesn't exists with the new version. I've only found C#

and VB.Net samples in MSDN ...

Thanks in advance.

Have you had a chance to look at: http://msdn2.microsoft.com/en-us/library/ms174034(en-US,SQL.90).aspx

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||

#include "ca_merge30.h"
#include <stdio.h>

void ErrorPrint() ;

#define VerifyResult(x) hr=x;\
if(FAILED(hr)) { \
printf("Failed : HR : %x\n",hr); \
printf("at : %d \n",__LINE__); \
ErrorPrint(); \
goto Exit; \
}
#define RELEASE(x) if(NULL!=x)x->Release();

extern "C" int __cdecl wmain(){

HRESULT hr = NOERROR;
ISSCEEngine *pISSCEEngine = NULL;
VerifyResult(CoInitialize(NULL));
VerifyResult(CoCreateInstance(CLSID_Engine, NULL, CLSCTX_INPROC_SERVER,
IID_ISSCEEngine, (void**)&pISSCEEngine));

WCHAR *wszSrc=L"Data Source = src.sdf";
WCHAR *wszDst=L"Data Source = dst.sdf";
VerifyResult(pISSCEEngine->CompactDatabase(wszSrc, wszDst));


Exit:
RELEASE(pISSCEEngine);
CoUninitialize();
return hr;
}

void ErrorPrint()
{
LPVOID lpMsgBuf;
DWORD dw = GetLastError();

FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );

printf( "Failed with error %d: %ls",
dw, lpMsgBuf);

LocalFree(lpMsgBuf);
}

Hope this helps! Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

(Sample By: BalaDutt, MSFT, SQL Mobile, Microsoft Corporation)

|||Many thanks ! It's exactly what i needed !|||

Glad that I could help you.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

This helped me as well, thanks. But I also cannot find any reference material for how to perform a "Verify" DB as advertised in the Documentation for SQL Server Mobile Edition.

The docs have a sample in C#, but nothing for OLD DB in C++.

Does anyone know how to do this?

Compact Sql Mobile 3.0 DataBase in C++/OLE DB ?

Hello,

I'm porting my C++ (EVC3) application from Sql CE 2.0 to Sql Mobile 3.0 (with OLE DB). To compact a 2.0 database, i used ISSCECompact interface. But it doesn't exists with the new version. I've only found C# and VB.Net samples in MSDN ...

Thanks in advance.

Have you had a chance to look at: http://msdn2.microsoft.com/en-us/library/ms174034(en-US,SQL.90).aspx

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||

#include "ca_merge30.h"
#include <stdio.h>

void ErrorPrint() ;

#define VerifyResult(x) hr=x;\
if(FAILED(hr)) { \
printf("Failed : HR : %x\n",hr); \
printf("at : %d \n",__LINE__); \
ErrorPrint(); \
goto Exit; \
}
#define RELEASE(x) if(NULL!=x)x->Release();

extern "C" int __cdecl wmain(){

HRESULT hr = NOERROR;
ISSCEEngine *pISSCEEngine = NULL;
VerifyResult(CoInitialize(NULL));
VerifyResult(CoCreateInstance(CLSID_Engine, NULL, CLSCTX_INPROC_SERVER,
IID_ISSCEEngine, (void**)&pISSCEEngine));

WCHAR *wszSrc=L"Data Source = src.sdf";
WCHAR *wszDst=L"Data Source = dst.sdf";
VerifyResult(pISSCEEngine->CompactDatabase(wszSrc, wszDst));


Exit:
RELEASE(pISSCEEngine);
CoUninitialize();
return hr;
}

void ErrorPrint()
{
LPVOID lpMsgBuf;
DWORD dw = GetLastError();

FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );

printf( "Failed with error %d: %ls",
dw, lpMsgBuf);

LocalFree(lpMsgBuf);
}

Hope this helps! Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

(Sample By: BalaDutt, MSFT, SQL Mobile, Microsoft Corporation)

|||Many thanks ! It's exactly what i needed !
|||

Glad that I could help you.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

This helped me as well, thanks. But I also cannot find any reference material for how to perform a "Verify" DB as advertised in the Documentation for SQL Server Mobile Edition.

The docs have a sample in C#, but nothing for OLD DB in C++.

Does anyone know how to do this?

Compact Sql Mobile 3.0 DataBase in C++/OLE DB ?

Hello,

I'm porting my C++ (EVC3) application from Sql CE 2.0 to Sql Mobile 3.0 (with OLE DB). To compact a 2.0 database, i used ISSCECompact interface. But it doesn't exists with the new version. I've only found C# and VB.Net samples in MSDN ...

Thanks in advance.

Have you had a chance to look at: http://msdn2.microsoft.com/en-us/library/ms174034(en-US,SQL.90).aspx

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||

#include "ca_merge30.h"
#include <stdio.h>

void ErrorPrint() ;

#define VerifyResult(x) hr=x;\
if(FAILED(hr)) { \
printf("Failed : HR : %x\n",hr); \
printf("at : %d \n",__LINE__); \
ErrorPrint(); \
goto Exit; \
}
#define RELEASE(x) if(NULL!=x)x->Release();

extern "C" int __cdecl wmain(){

HRESULT hr = NOERROR;
ISSCEEngine *pISSCEEngine = NULL;
VerifyResult(CoInitialize(NULL));
VerifyResult(CoCreateInstance(CLSID_Engine, NULL, CLSCTX_INPROC_SERVER,
IID_ISSCEEngine, (void**)&pISSCEEngine));

WCHAR *wszSrc=L"Data Source = src.sdf";
WCHAR *wszDst=L"Data Source = dst.sdf";
VerifyResult(pISSCEEngine->CompactDatabase(wszSrc, wszDst));


Exit:
RELEASE(pISSCEEngine);
CoUninitialize();
return hr;
}

void ErrorPrint()
{
LPVOID lpMsgBuf;
DWORD dw = GetLastError();

FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );

printf( "Failed with error %d: %ls",
dw, lpMsgBuf);

LocalFree(lpMsgBuf);
}

Hope this helps! Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

(Sample By: BalaDutt, MSFT, SQL Mobile, Microsoft Corporation)

|||Many thanks ! It's exactly what i needed !
|||

Glad that I could help you.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

This helped me as well, thanks. But I also cannot find any reference material for how to perform a "Verify" DB as advertised in the Documentation for SQL Server Mobile Edition.

The docs have a sample in C#, but nothing for OLD DB in C++.

Does anyone know how to do this?

Compact Database Error Code: 0

I am currently working in VB.NET with SQL Mobile 2005. I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring). When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database. The code works however it only seems to work for smaller databases. Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

I am able to compact the database of size nearly 21 MB in our lab. Is it possible for you to share the repro for us to diagnose.

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

|||What do I need to do in order to give you the repro, do you mean just an actual copy of the database itself or something else?|||

Yes actual copy of the database itself. Before sharing it to me, can you check whether the DB is in correct state. compact.exe /verify would let you know if there any bad pages in the DB.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The DB is in the correct state. Do you have a direct email address that I can send this to you because this will not let me send this as an attachment.|||Please send it to l-a-x-m-i-n-r-o-A-T-m-i-c-r-o-s-o-f-t-D-O-T-c-o-m Please also paste this question link in the mail for the context. Thanks, Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation|||

Hi Snuggs,

As per our conversation I could see that you have opened a bug here in Product Feedback center. http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=d0f14331-1b05-418a-9a11-2378457e4eb8

And as mentioned we could not repro. We are able to compact the DB very easily with a sample C# program mentioned in the above URL.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Compact Database Error Code: 0

I am currently working in VB.NET with SQL Mobile 2005. I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring). When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database. The code works however it only seems to work for smaller databases. Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

I am able to compact the database of size nearly 21 MB in our lab. Is it possible for you to share the repro for us to diagnose.

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

|||What do I need to do in order to give you the repro, do you mean just an actual copy of the database itself or something else?|||

Yes actual copy of the database itself. Before sharing it to me, can you check whether the DB is in correct state. compact.exe /verify would let you know if there any bad pages in the DB.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The DB is in the correct state. Do you have a direct email address that I can send this to you because this will not let me send this as an attachment.|||Please send it to l-a-x-m-i-n-r-o-A-T-m-i-c-r-o-s-o-f-t-D-O-T-c-o-m Please also paste this question link in the mail for the context. Thanks, Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation|||

Hi Snuggs,

As per our conversation I could see that you have opened a bug here in Product Feedback center. http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=d0f14331-1b05-418a-9a11-2378457e4eb8

And as mentioned we could not repro. We are able to compact the DB very easily with a sample C# program mentioned in the above URL.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation