Page 1 of 1

Installing SQL Server Compact Edition

Posted: Fri Aug 17, 2012 2:28 pm
by somnetics
I have an application that uses MSFT SQL Server Compact Edition 3.5 SP2. I check this on the Application RunTimes.

It seems to try to install 3.5.8080.0. The install crashes on systems that already have 3.5.8082.0 saying a newer version exists.

How can I get around this?

Re: Installing SQL Server Compact Edition

Posted: Mon Aug 20, 2012 5:13 am
by FrancescoT
Dear User,

for what I know the scripts added with "MS SQL Server Compact Edition 3.5 SP2" runtime selection, actually verify if a same version of the runtimes are installed. But in any case, the installation package "SSCERuntime_x86-ENU.msi" (supplied by Microsoft and used by the runtime installation script) should check if a previous or a more recent version is available with the target system and should take the appropriate action.

So it should not crash.

By the way, if you want to track the version installed on target system before to proceed with installation, you can read the value of the following registry keys:

- x86 system with runtime installed:

Code: Select all

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU\DesktopRuntimeVersion
"DesktopRuntimeVersion"="3.5.8080.0" 
"DesktopRuntimeServicePackLevel"="2" 
- x64 system with x86 runtime installed:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU] 
"DesktopRuntimeVersion"="3.5.8080.0" 
"DesktopRuntimeServicePackLevel"="2" 
x64 system with both x86 and x64 installed:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU] 
"DesktopRuntimeVersion"="3.5.8080.0" 
"DesktopRuntimeServicePackLevel"="2" 
"DesktopRuntimeVersion_x64"="3.5.8080.0" 
Hope this helps you.

Regards

Re: Installing SQL Server Compact Edition

Posted: Mon Aug 20, 2012 7:37 am
by somnetics
Maybe crash is the wrong word. The install puts up a text box that says a newer version of the sql dll exists and then the install quits.

Where are the msi files stored? How can I put the 8082 version msi into my install project?

Re: Installing SQL Server Compact Edition

Posted: Mon Aug 20, 2012 9:13 am
by FrancescoT
Dear User,

all the InstallAware runtimes are available in the IA installation folder.
Generally these are stored in (... it dependes on the driver you used as target during IA installation):
C:\Program Files (x86)\InstallAware\InstallAware 2012\runtimes.

When you select a Runtime in IA IDE, generally two script files are added to your project.

In your case, choosing the Server Compact Edition 3.5 SP2 the scripts are:
- checksqlcompactsp2.mia - checks if the runtime is already installed.
- setupsqlcompactsp2.mia - Runs the runtime installation.

With the "setupsqlcompactsp2.mia" you have the following code lines:

Code: Select all

 Define File Bag : #IADIR#\runtimes\sqlcompactsp2bin\*.*, get runtime location of files into variable SQL35SP2FILES
 Set Variable SQL35SP2ERR to 
 Install/Remove MSI Package $SQL35SP2FILES$\SSCERuntime_x86-enu.msi[ADDLOCAL=ALL] (get result into variable SQL35SP2)
The first one, (DEFINE FILE BAG) points to the location used by InstallAware to store "Server Compact Edition 3.5 SP2" runtime and adds the runtime installation package to the project.
The second one, (Install/Remove MSI Package) executes the MSI installation package on target system.

So in your case you could replace the above runtime with a more recent as you prefer (... you can obtain it from Microsoft).
You can also create a custom version of these scripts (copying the default one) for later use with other projects.

Hope this helps you.

Regards