Thursday, May 31, 2007

FileNotFoundException was unhandled

Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
The system cannot find the file specified.


You might encountered this error when the System.Data.SqlServerCe version has redirected to another newer version due Visual Studio 2005 generated code on your application config file.

To solve this problem, you have to delete something like below in you app.config file.


xmlns="urn:schemas-microsoft-com:asm.v1">

name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91"
culture="neutral"/>
newVersion="9.0.242.0"/>


hope this helps






Saturday, May 26, 2007

You are trying to access an older version of a SQL Server Compact Edition database. If this is a SQL Server CE 1.0 or 2.0 database, run upgrade.exe.

This happens when your .sdf database version changed and perhaps corrupted. It might due to merge replication of using SQL Server 2005. Therefore the only solution is to repair it.

To repair it you must use the
System.Data.SqlServerCe.SqlCeEngine class, version 9.0.242.0 or 3.5.0.0

Here is the example of the implementation.


File.Copy(@"F:\northwind.sdf",@"F:\northwind.sdf.temp");
File.Delete(@"F:\northwind.sdf");
SqlCeEngine
engine = new SqlCeEngine(@"Data Source
=F:northwind.sdf.temp");
engine.Compact(@"Data
Source=F:\northwind.sdf");
File.Delete(@"F:\northwind.sdf.temp");



A repaired northwind.sdf is produced and now you should not be getting this error again. Any other alternative? Please let me know. :)

Friday, May 25, 2007

Before trying to solve, think first

most of us solve problem as straight away try to do it without thinking or planning when given a problem. This often lead to slow productivity because the method used is not effective enough to solve the a given problem. Perhaps there is a better way solving the problem, you might not know it. Therefore just keep these checklists in mind before starting any problem solving:

Do your research and gather as much information as you can.
Any question, don't wait... ask Google.
Give yourself various alternative solutions.
Be creative and don't afraid to break the rules.


If you could follow all these mention above, you could be a better problem solver.

Wednesday, May 23, 2007

software user interface design.

User interface is very important to improve the usability of the software. Software application failed to meet user expectations and requirements are often due to the lack of proper UI design. Simple UI often impress user whereas complex UI often frighten user away. When design UI, the first thing have to come to every developer mind; always design in user perspective.

A great UI must always have these criteria:

simple and does the job right.
good navigation and proper UI arrangement
easy accessible functions and customized menu for the user
fast and responsive UI

please keep in mind that UI design is the first user impression of the software.