 |
|
 |
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
|
|
|
|
 |
|
 |
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...
|
|
|
|
 |
|
 |
I've got to give you credit. This is very well done. I like it because it is so lightweight compared to alternatives such as SSMSE I've only seen a few unhandled exceptions, like when trying to drag to reorder columns in the Graphical Query Designer. It doesn't like that.
I ran across this because I was looking for a password reset tool for SDF files that could handle both subscriptions as well as the core DB protection. It doesn't appear that you have this feature. I would like to suggest that you add the ability to reset the __sysMergeSubscription and __sysMergeSubscriptionProperties system tables using the SqlCeReplication class. I do this in some of my software, but I wanted a general utility to do it as well.
In general this functionality could:
* Run Sync
* Reset the Subscription
* Reset the password for the subscription
(required when moving a CE db to another box because of machine key encryption)
* Reinitialize the Subscription
* Delete the Subscription
Just a suggestion that could round out your tools functionality. I'll be creating a tool to do just this part if I can't find an alternative and will post to Code Project. If I get it done soon I'll repost a message and you can feel free to incorporate the code into your project if you choose.
Thanks,
Chris
|
|
|
|
 |
|
 |
Thanks a lot for the feedback.
|
|
|
|
 |
|
 |
I think I found another issue. I exported a db from full sql server to CE4 and an error occurred in a unit test saying I was trying to order by an ntext field in my query.
I didn't have any in that table and looked further into it and the table created by CEQuery defined a column as NTEXT where in the source database it was created from it was defined as nvarchar(500).
Was this intentional or a bug of some kind?
=-=-=-=-=-=-=-=-EDIT=-=-=-=-=-=-=-=-=-=-
Found it!
I took a look in the source:
SqlGenerator.cs in the method GenerateTables()
switches to an ntext if a varchar or nvarchar are over 255 characters.
I just checked and the limit for CE 4 is 4000 characters, was this a problem in earlier versions of CE?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
There is no failure only feedback
modified on Friday, April 15, 2011 2:54 PM
|
|
|
|
 |
|
 |
Hello John,
I know this limit[4000] previously but I dont remember the exact reason about why I have done the limit to 255 in my code... May be my mistake. I will update that to 4000.
Thanks for your valuable feedbacks.
Regards.
|
|
|
|
 |
|
 |
I just installed CE Query tool for CE 4 on my windows 7 32 bit dev machine and the export from sql server option has an error part way through:
"Access to the path 'C:\Program Files\Mayukh's Lab\CEQuery\SQLExportQuery3f28884c-4faf-457b-8046-fc4579509baa.txt' is denied."
It appears you are trying to write to the program files folder which is a no no in Windows 7 and actually has been against windows guidelines as far back as windows nt 4, probably earlier but wasn't enforced until Vista and newer.
Instead you should write to the approved temp folder to avoid UAC access problems. There's lots of info on this online.
To resolve this issue I copied the contents of the CEQuery program files from the program files folder to a temp folder and re-ran it and it worked perfectly with my large complex database which saves me a *lot* of work.
Some have said that this tool is redundant due to SQL SErver management studio 2008. I invite them to try to export a sql server database to sql compact edition version 4 with any of the available tools (they don't exist yet); your utility is therefor still relevant and extremely useful.
There is no failure only feedback
|
|
|
|
 |
|
 |
First of all, Thanks a lot for your feedback.
I was not aware of the fact that Win7 does not allow to write it in the "Program File" folder. I have tested the tool in my XP environment and it ran perfectly. In such a case, I will change my program to write the SQL query in some other folder instead of program files. Again thanks a lot for the valuable feedback.
Regards,
Mayukh
modified on Friday, April 8, 2011 2:45 PM
|
|
|
|
 |
|
|
 |
|
|
 |