Deploying SQL Compact with Inno
I have a fairly simple program that uses a small database so I decided use SQL Server Compact 3.5 even though my target is Desktop PCs and not mobile devices.
I have the rest of my installation written using Inno Setup, but I am not sure what to do with the database.
Do I have to distribute the SQLServerEv31-EN.msi file or is it possible to just distribute a few dlls?
Re: Deploying SQL Compact with Inno
From what I've heard you just need to distribute a few DLL's, and would recommend checking the readme file that came with it (or the MS knowledgebase) to find out which ones they are, and where they should be placed, etc.
Re: Deploying SQL Compact with Inno
Didn't occur to me to check the installation directory for a readme file!
That does list the dlls, but more than you need (extra foreign language ones I think).
Searching for the name of one of the dlls gave me my answer much quicker than hours of searching for "SQL compact deploy"!
According to this page you need to deploy 7 dlls
http://msdn2.microsoft.com/en-us/library/aa983326.aspx
- sqlceca35.dll
- sqlcecompact35.dll
- sqlceer35EN.dll
- sqlceme35.dll
- sqlceoledb35.dll
- sqlceqp35.dll
- sqlcese35.dll
Re: Deploying SQL Compact with Inno
Yes - I've seen that list of 7 DLL's before...
Please keep us posted with how well the SQL CE behaved on your desktop installations - I would like to know for future reference myself!
Re: Deploying SQL Compact with Inno
You also need System.Data.SqlServerCe.dll
This is in C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop
The other 7 dlls are in
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5
Re: Deploying SQL Compact with Inno
I added this to my [Files] section in Inno
Code:
;SQL Server Compact Edition 3.5 files
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlcecompact35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceer35EN.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceme35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceoledb35.dll; DestDir: {app}; Flags: regserver
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceqp35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlcese35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceca35.dll; DestDir: {app}; Flags: regserver
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll; DestDir: {app}
Interestingly, the program ran with only the following
Code:
;SQL Server Compact Edition 3.5 files
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceme35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlceqp35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\sqlcese35.dll; DestDir: {app}
Source: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll; DestDir: {app}
Although, all I was doing was a few SELECT and UPDATE statements.