 |
 |
When using a different language or format collate or dates, the program generates the script properly, but if you try to load this script into SQLCE with a different format just does not load.
The probe and solution that works is to convert the date format ISO STD:
In the code called SQLGenerator in GenerateTableContent method ()
you add these lines
else if (dt.Columns [iColumn]. DataType.FullName == "System.DateTime")
{
ds_fecha string;
dt_fecha = (DateTime) dt.Rows [iRow] [iColumn];
ds_fecha = dt_fecha.ToString ("s");
_sbScript.AppendFormat ("'{0}'", ds_fecha);
}
This script generates correctly and then load it without problems date formats.
I hope someone can serve you, my contribution.
|
|
|
|
 |
when i open a sdf database file then system need password ?
|
|
|
|
 |
Great Tool!
Kindly can you help me out, I am looking for a solution, where I can extract data from multiple SQL CE DBs (having same structure)?
Or any tool where I can marge data of multiple SQL CE DBs?
Regards,
Waqas
|
|
|
|
|
|
|
|
|
 |
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: [email protected]
|
|
|
|
 |
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...
|
|
|
|
 |
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
|
|
|
|
|
|
 |
Hi,
Link your post, I'm facing a issue in CE query tool. I'm trying to open sdf file but unable to open in in this tool, received following error
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
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.
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CEQuery
Assembly Version: 6.0.0.0
Win32 Version: 6.0.0.0
CodeBase: file:///C:/Program%20Files/Mayukh's%20Lab/CEQuery/CEQuery.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data.SqlServerCe
Assembly Version: 3.5.0.0
Win32 Version: 3.5.8080.0
CodeBase: file:///C:/Program%20Files/Mayukh's%20Lab/CEQuery/System.Data.SqlServerCe.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I want to export data from sdf to excel, if you could suggest some solution software or web that would be great.
*sdf file i use in Windows Mobile 6.1
Regards,
Waqas
|
|
|
|
 |
Hi,
The tool is capable of opening the CE 3.5 SP2/CE 4.0 files for Desktop versions only. I have not tested the SDF files which is used for Windows Mobile. If you can send me a sample sdf file which is causing a problem in my email [[email protected]], so that I can have more idea on resolving this and also try to give you a solution. Also please let me know which version of SQL CE [3.5 or 4] you are using.
Thanks
|
|
|
|
 |
Very good tool. Thank you.
|
|
|
|
|
 |
Hello ray,
I have never use SQL Server. I am very interested on it. I hope that you can help me to learn about this. Thanks
|
|
|
|
|
 |
Great! Thanks for sharing.
|
|
|
|
|
 |
Nice piece of work. You've thought of everything
|
|
|
|
 |
Thanks a lot. Watch out for the new version with more features in couple of days.
Regards,
Mayukh
|
|
|
|
 |
Thanks a lot mate, this is awesome & easy to use too. Cheers.
|
|
|
|
 |