ScadaAdmin uses reference, System.Data.SqlServerCe,to connect to BaseSDFFile in localDB, like SqlCeconnection conn = new SqlCeconnection(“Data Source =” + @”C:\SCADA\BaseSDF\ScadaBase.sdf”).However,When I did this in ScadaServerSvc.MainLogic.cs, (Reference Path is %programfile%/MicroSoft SQL Server Compact Edition/v3.5/Desktop/System.Data.SqlServerCe.dll),there comes the exception in ScadaServerSvc.log,“Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8080. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.”
I have tried to solve the problem by Using SqlCeEngine.Upgrade() to Upgrade BaseSDFFIle from V3.5 to v4.0, but then ScadaAdmin cannot access to BaseSDFFile.
And what confused me is why in ScadaAdmin the Accesss is fine,however in ScadaServerSvc.MainLogic.cs,the Exception comes.
I know I should not use MSSQLCompact from SCADA-Server.The reason I do that is I need to deal with a problem that Once I Click on pass to SCADA-Server in ScadaAdmin application,the Modification in BaseDAT disappears and returns to a state which I did nothing about it,and I realized that BaseSDF rules,it will determine BaseDAT. Is there any approach to Solve this problem?