 |
|
|
 |
|
|
 |
|
 |
Ray - Very well done. Thanks for taking the time to share this very helpful utility. Steve
|
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
I got the error:
Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8482. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
I have SQL CE 4.0 and SQL CE 3.5 installed.
|
|
|
|
 |
|
 |
Not sure why this happens. I have never found this issue before. Can you try to uninstall everything you have [SQL CE 3.5/4 and CEQuery] and try to install CEQuery for SQL Server 3.5 only from the link in this article? Make sure you have connected to Internet. Let me know if that solves the issue.
Also, I have just uploaded a new installer today with sum bug fixes. The installer will be available in CodeProject in couple of days. In the mean time, You can get the latest installer from the codeplex site.
~Mayukh
modified on Thursday, September 8, 2011 2:51 PM
|
|
|
|
 |
|
 |
As you asked, I uninstalled CEQuery, SQLCE 4.0, SQLCE3.5 SP2. Then, as I use SQLCE 4.0, I installed SQLCE 4.0 and after I installed your last version of "CEQuery v6 for SQL Server CE 4.0" downloaded today from codeplex.
The error continues.
System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8482. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()
at System.Data.SqlServerCe.SqlCeConnection..ctor()
at System.Data.SqlServerCe.SqlCeConnection..ctor(String connectionString)
at CEQuery.OpenDB.btnOK_Click(Object sender, EventArgs e)
...
|
|
|
|
 |
|
 |
Sorry to hear that. I have told you to install CEQuery for SQL CE 3.5 because it has all the pre-requisite checks before installing. Anyways, if you install the CEQuery for SQL CE 4, then please install the SQL Server CE 4 runtime from the following URL:
http://www.microsoft.com/download/en/details.aspx?id=17876. Otherwise give a try with CEQuery for SQL CE 3.5. Let me know the status. You can directly contact on my email: mayukh.ray@gmail.com
|
|
|
|
 |
|
 |
I get the same error.
My application uses SQL CE v4, I therefore have SQL CE v4 installed. I downloaded your v4 edition and tried to open my v4 SDF file and got the same error and error call stack.
Andy
|
|
|
|
 |
|
 |
Sorry to hear it again. But I have tested both the version in 32 bit machine and both works fine. Does your machine uses 64bit environment? If so, can you please check if the program can run after giving "full access to everyone" for the SQL CE Installation folder?
C:\Program Files\Microsoft SQL Server Compact Edition\v4.0
C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0
~mayukh
|
|
|
|
 |
|
 |
According the KB article the exception asks to reference
>>
On 64-bit computers, a SQL Server Compact (“Compact”) based application may fail with one of the following two symptoms:
Symptom 1
The application is trying to load a version of Compact that is incompatible with the version that is installed on the computer. Incorrect versions could lead to application instability and the loading of Compact would be aborted.
Symptom 2
The application cannot load the native components of SQL Server Compact that corresponds to the ADO.NET provider
<<
I can confirm I've a 64bit environment, however, I've SQL CE v4 and not v3.5. I've also ran the app as Administrator which results in the same error. The applications I've developed on my machine use SQL CE v4 and database files created in v4.
Perhaps I'll download the source and see where it's failing.
Andy
|
|
|
|
 |
|
 |
mayukh,
I too was having the same problem as others. I believe the problem lies with the way you have referenced the SQLCE .dll's when trying to configure a private deployment. I solved the issue on my system by:
-creating an app.config file (named CEQuery.exe.config) with the contents:
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="SqlCe4"/>
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" />
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.0.0.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
-create a sub-folder in your install folder named "SqlCe4" (matching the privatepath above) which contains System.Data.SqlServerCe.dll and the amd64 and x86 folders with sqlce*.dll files and Microsoft.VC90.CRT folder with required c++ file and manifest.
-I removed your copy of the System.Data.SqlServerCe.dll file in the root of your install folder.
Have a look at this for more info:
SQL Server Compact Private Deployment tweaks
|
|
|
|
 |
|
 |
I followed your tip but it didn't work for me.
I've gotten this error:
"The volume for a file has been externally altered such that the opened file is no longer valid."
If I remove the file "CEQuery.exe.config" the error becomes "could not load the file or assembly..."
|
|
|
|
 |
|
 |
Can you please take the codebase of the application and run in your machine to see where the error is coming on?
|
|
|
|
 |
|
 |
There's an issue with loading libraries on 64bit. Open the codebase and set the target CPU to x86 to resolve the issue.
|
|
|
|
 |
|
 |
Thank you very much for the support. I have tested all my code for 32 bit machine and I have face no problem. I don't have any 64but environment. Thus, I could not able to reproduce the error. I am searching one such environment to test my code.
~Mayukh
|
|
|
|
 |
|
 |
The solution to the problem is per bitspam's recommendation. I did what he first suggested which failed, however I then noticed his old/new version numbers and that you're deploying v4.0.0.1
In bitspam's suggested config file, I swapped the version numbers around therefore making old version "4.0.0.1" and new version "4.0.0.0" and copying my v4.0.0.0 System.Data.SqlServerCe file into the sub-folder.
Seems to work fine now.
Andy
|
|
|
|
 |
|
 |
I can confirm exact same error in a 32 bit environment with the setup here that I just downloaded a few minutes ago. It's windows 7 32 bit. I'll try the config file thing someone reported in this thread.
There is no failure only feedback
|
|
|
|
 |
|
 |
It's mystifying why you were voted down for this. Some useless twat out there.
There is no failure only feedback
|
|
|
|
 |
|
 |
Hej,
this tool is just great! It made my work much easier. There is only one thing that - in my opinion - is missing: How about opening .sdf files with a simple double-click?
I made some small changes needed to enable the feature, altering the following methods:
Program.cs:
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ThreadExceptionHandler handler = new ThreadExceptionHandler();
Application.ThreadException += new ThreadExceptionEventHandler(handler.Application_ThreadException);
Application.Run(new Splash());
Application.Run(new MainForm(args));
}
MainForm.cs:
public MainForm(string[] args)
{
InitializeComponent();
this.Text += String.Format(" [Version {0}]", Assembly.GetExecutingAssembly().GetName().Version.ToString());
if (args != null && args.Length > 0)
{
OpenDB dbOpen = new OpenDB(args[0]);
if (dbOpen.ShowDialog() == DialogResult.OK)
{
ConnectionString = dbOpen.ConnectionString;
using (SqlCeConnection connection = new SqlCeConnection(ConnectionString))
{
try
{
connection.Open();
this.toolStripStatusLabel.Text = "DB selected successfully.";
FormQuery frmQuery = new FormQuery();
frmQuery.MdiParent = this;
frmQuery.ConnectionString = this.ConnectionString;
frmQuery.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
connection.Close();
}
}
}
}
}
OpenDB.cs:
public OpenDB(string startupFile)
{
InitializeComponent();
if (System.IO.File.Exists(startupFile))
{
CEFile = startupFile;
txtFile.Text = startupFile;
txtPassword.Focus();
}
}
Thanks a lot and have fun!
(\ /)
( . .) <3
c(")(") Bjørn
|
|
|
|
 |
|
 |
Thank you very much... I really appreciate your effort for introducing this sweet features...
~Mayukh
|
|
|
|
 |
|
 |
Great tool! Lightweight alternative to SSMSE.
|
|
|
|
 |
|
 |
Thanks again...
|
|
|
|
 |