SQL Server Compact 4.0

Posted by Community Admin on 03-Aug-2018 05:40

SQL Server Compact 4.0

All Replies

Posted by Community Admin on 28-Aug-2013 00:00

Has anyone every tried and got Sitefinity 5 or 6 to work with SQL Server Compact Framework 4.0??
If yes what are the steps please?

Posted by Community Admin on 28-Aug-2013 00:00

Hello Anders,

I'm quoting the reply in this thread:
SQL Server Compact Edition is supported by OpenAccess ORM used by Sitefinity which means that Sitefinity should be able to work with it but it is not tested.

In order to be more helpful, I'll try it out and post my findings here.

Regards,
Grisha 'Greg' Karanikolov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 28-Aug-2013 00:00

thanks. I had already seen that post but there is a dearth on this issue in sitefinity forums and the google and all did not help getting past the provider error.

Posted by Community Admin on 29-Aug-2013 00:00

Hi Anders,

It seems there's a reason for you not finding too much information about SQL CE. I've been digging into the topic. I am at the stage of converting my project's MDF database to a SQL CE SDF. After searching on howto-s for that I've found that there's a SQL Server Compact toolbox plugin for Visual Studio, which I'm now downloading and trying out. I will update this thread with the results.

Next steps are setting up the project to work with SQL CE and trying it out.

I'll keep you posted.

*Update:

I tried converting my MDF database several times. It fails if I try to use the MDF file directly. I get further if I attach the database in my SQL server first. However, the conversion fails at some point with this error:


This is not a Sitefinity error, but one related to the conversion. I'll circulate this internally to see if any of the DB gurus on the team has any tips for us. You can try it on your end and post if you had success or the same issue as well.

Regards,
Grisha 'Greg' Karanikolov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Aug-2013 00:00

you need this latest version 11 August 2013 from here visualstudiogallery.msdn.microsoft.com/.../

It has an "export sql server to sql server compact 4.0..." menu option
thats what i used still no joy though ( it convert the mdb to sdf ok) on the sitefinity side.

Can you confirm this is the correct string for compact 4.0
<connectionStrings>
    <add connectionString="data source=|DataDirectory|\sitefinity.sdf" providerName="System.Data.SqlServerCe.4.0" dbType="SqlCE" name="Sitefinity" />
       
    </connectionStrings>

in Dataconfig.config

Posted by Community Admin on 29-Aug-2013 00:00

Error  I getting is below may be this will help your end.
The current type, Telerik.Sitefinity.Model.IDatabaseMappingContext, is an interface and cannot be constructed. Are you missing a type mapping?Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The current type, Telerik.Sitefinity.Model.IDatabaseMappingContext, is an interface and cannot be constructed. Are you missing a type mapping?

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 

[InvalidOperationException: The current type, Telerik.Sitefinity.Model.IDatabaseMappingContext, is an interface and cannot be constructed. Are you missing a type mapping?]
Telerik.Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context) +286
BuildUp_Telerik.Sitefinity.Model.IDatabaseMappingContext(IBuilderContext ) +74
Telerik.Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +42
Telerik.Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +319
Telerik.Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +260
Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +373

[ResolutionFailedException: Resolution of the dependency failed, type = "Telerik.Sitefinity.Model.IDatabaseMappingContext", name = "SqlCE".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Telerik.Sitefinity.Model.IDatabaseMappingContext, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:

Resolving Telerik.Sitefinity.Model.IDatabaseMappingContext,SqlCE
]

Posted by Community Admin on 29-Aug-2013 00:00

That's the one I used,
anyway, since you've managed to convert your DB successfully, would you like to upload your project and the .sdf database to an FTP account I've set up for you, so that I can try attaching the database?

I'm sending you the FTP details separately in an e-mail.

Regards,
Grisha 'Greg' Karanikolov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Aug-2013 00:00

Super I was thinking of doing that but did not want to publish
my pages.

I will emai when done upload say 15mins or so after receiving
the ftp or do you prefer I send you a Dropbox link on the private email

I think its quicker.

Posted by Community Admin on 29-Aug-2013 00:00

Whatever's more convenient for you, Anders!


Regards,
Grisha 'Greg' Karanikolov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Aug-2013 00:00

have not received the private email yet

Posted by Community Admin on 29-Aug-2013 00:00

email with sdf file sent

ANy luck on your side?

Posted by Community Admin on 30-Aug-2013 00:00

Hi Anders,

The current type, Telerik.Sitefinity.Model.IDatabaseMappingContext, is an interface and cannot be constructed. Are you missing a type mapping?

Same thing on my end. It seems there is not much info on how to really setup the Compact edition of the SQL server. Here's what I did - I managed to convert my database to an .SDF file. From what I read , the .sdf database has to be selected in the data source parameter indeed, just like you did. I've selected System.Data.SqlServerCe.dll to be the provider here.

I will keep digging to see what I find further on, Anders.

Regards,
Grisha 'Greg' Karanikolov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 30-Aug-2013 00:00

Thanks for the effort. Thats exactly where I am. I hope you guys can fix this.

Posted by Community Admin on 02-Sep-2013 00:00

Hi Anders,

Did further digging into this and spoke to one of the DB gurus on our team. Apparently they tried hooking Sitefinity to SQL CE some time ago, but hit some limitations in the database engines when working with our fluent mappings. That's the reason we've not listed SQL server compact as a supported DB engine.

This is the status so far, unfortunately. If there are any changes, we will announce it publicly and I will update this thread.

Anders, could you give me your current use case so that I can use it in our internal feature request logging system?

Regards,
Grisha 'Greg' Karanikolov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 02-Sep-2013 00:00

Thanks for your effort.
I was trying to use sitefinity on my current hoster which does not provide SQL Server on its standard plan. Ie. you have to pay an additional 10USD a month for SQL Server.
I am now looking at the recommended hosters esp Arvixe.

This thread is closed