none
SQL server Compact alternative

    Question

  • Hi,

    I´m trying to find a database for my app and would appreciate some suggestions.

    I developed an app in visual studio community 2015 with sql server express. Now that i´m on the deployment stage i found out that sql express needs to be installed on the client computers witch is unacceptable for this situation.
    I tried to use compact to resolve the issue but had some problems adding the datasource.
    Now that i see that it will be discontinued i have to search for alternatives.

    Does anyone know of a simple database that will work with crystal reports?
    Nothing special needed, it just has to store data nothing else.

    Thanks in advance,


    • Edited by Marc -IT Monday, November 28, 2016 2:16 PM
    Monday, November 28, 2016 2:15 PM

Answers

  • There is nothing to install with SQL Server CE (I just embed the DLLs (sqlceoledb40.dll, ...) in resource and extract them in the application directory once.

    (for example, this small app for LOTRO (C++) uses a SQL Server CE database without install (zip with .sdf + .exe) : http://lesfuretsdugondor.info/2015/07/lotro-item-database/)

    I use IDBInitialize interface to connect



    • Edited by Castorix31 Monday, November 28, 2016 2:31 PM
    • Marked as answer by Marc -IT Monday, November 28, 2016 5:02 PM
    Monday, November 28, 2016 2:27 PM
  • I have a blog post here: http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html


    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by Marc -IT Monday, November 28, 2016 5:02 PM
    Monday, November 28, 2016 4:24 PM
    Moderator

All replies

  • There is nothing to install with SQL Server CE (I just embed the DLLs (sqlceoledb40.dll, ...) in resource and extract them in the application directory once.

    (for example, this small app for LOTRO (C++) uses a SQL Server CE database without install (zip with .sdf + .exe) : http://lesfuretsdugondor.info/2015/07/lotro-item-database/)

    I use IDBInitialize interface to connect



    • Edited by Castorix31 Monday, November 28, 2016 2:31 PM
    • Marked as answer by Marc -IT Monday, November 28, 2016 5:02 PM
    Monday, November 28, 2016 2:27 PM
  • There is nothing to install with SQL Server CE (I just embed the DLLs (sqlceoledb40.dll, ...) in resource and extract them in the application directory once.

    (for example, this small app for LOTRO (C++) uses a SQL Server CE database without install (zip with .sdf + .exe)

    I use IDBInitialize interface to connect



    Hi, thanks for the reply.
    That seems to be what i need.
    Do you know of a tutorial that i can follow the use your solution?
    Monday, November 28, 2016 2:34 PM
  • I made my own C++ classes from MSDN OLEDB samples (like https://msdn.microsoft.com/en-us/library/ms810892.aspx ) and from this thread

    (but I think it is even simpler in C# or VB.NET)



    • Edited by Castorix31 Saturday, December 10, 2016 12:38 PM
    Monday, November 28, 2016 2:50 PM
  • I have a blog post here: http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html


    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by Marc -IT Monday, November 28, 2016 5:02 PM
    Monday, November 28, 2016 4:24 PM
    Moderator
  • Hi,

    I´ve been following your tutorial to integrate an SQL compact database in a c# winform app http://erikej.blogspot.pt/2011/02/using-sql-server-compact-40-with.html

    But I got stuck on the App.xaml part.

    My app doesn’t have that file, I searched the comments and found an answer from you saying to use Main in Program.cs.

    But I cant figure out how to do that.

    Would it be possible to give me some pointers on how to complete these steps?

    All the other steps worked fine.

     

    Thanks

    Tuesday, November 29, 2016 10:10 AM
  • Do you have a program.cs?  then just ad the code to the Main method there


    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Tuesday, November 29, 2016 10:33 AM
    Moderator
  • Hi,

    i tried to but when i do e get several errors.

    Ex: invalid token’<’
    Application.Resources does not exist in the current context
    Etc...


    I tried to build the setup file and run it on another machine without sql server installed and get the error:

    "Possible file version mismatch detectes between ADO.NET Provider and native binaries of SQL Server Compact witch could result in an incorrect functionality."

    I have a 64 bit system and have SQL Compact 64 bit installed, the files i copied from the sql compact folder are 64 bit but i used the prefer 32 bit in build options.
    Could it be because of this?
    but if i try to install the 32 bit version i get an error that my system is 64bit.

    Thanks for the help.

    Tuesday, November 29, 2016 11:50 AM
  • 1: Some of the lines in the sample code are broken into 2 lines, you need to reformat them to a single line.

    2:  x64 issue: I think you did not follow the instructions in the blog post: Copy C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private\System.Data.SqlServerCe.dll to your project folder, and then copy all files and folders in C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Private\x86 also to your project folder.


    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Tuesday, November 29, 2016 3:34 PM
    Moderator