Showing posts with label Error. Show all posts
Showing posts with label Error. Show all posts

Wednesday, January 26, 2011

WPF Hosting Winform

When hosting a WinForm in a WPF application, the WinForm will not render correctly.

This is because in the Program.cs file:

        System.Windows.Forms.Application.EnableVisualStyles();

is called.

You must do this manually.

{
   System.Windows.Forms.Application.EnableVisualStyles();

   WindowsFormsHost wfh ...

   ...
}

Friday, January 21, 2011

C# WPF Grid Mouse Event Not Firing

A UIELEMENT in WPF that inherits from Panel, must have a BACKGROUND color in order to bubble a "Click' event.

Tuesday, June 29, 2010

ASP.NET MVC 500.24 Error

This error occurs because Asp.Net cannot apply a detected setting in Integrated managed pipeline mode.

In the Web.config add this line of code in the [system.webserver] block.

[validation validateintegratedmodeconfiguration="false"]

This will ignore the error.


-------------------------


Also, in IIS web.config, in the system.web element, there is the identity impersonate=true element. Delete.

Tuesday, June 22, 2010

MySQL Workbench Foreign Key Restraint

In MySQL Workbench, the user can alter tables. When altering tables, the user can add 'foreign keys' and 'indexes' to tables.

MySQL Workbench will not allow the user to add foreign keys in certain situations, and will not give adequate error messages so the user can fix them.

Some important things to remember when altering a table to add foreign keys in MySQL Workbench.

1.
Both columns must be EXACTLY the same type. If one column is unsigned INT(10), the other must be unsigned INT(10).

2.
Since, MySQL Workbench will make an index of a foreign key, the foreign key MUST BE AN INDEX of the referenced table, otherwise the script will not be successful.

Tuesday, May 25, 2010

JavaScript Addition

Apparently, IEEE makes standards for JavaScript that make accurate addition difficult.

I haven't found the exact standard, but I'm looking for it.

When you add numbers with decimals, JavaScript will add value.

For instance:

115.04 + 15 = 130.04000000000002

Instead of 130.04

So, I found a work around for this. Use *.toPrecision(##).

toPrecision will allows you to truncate the value.

Thursday, April 15, 2010

.Net MySQL Connector Error

Apparently there is an error that can occur when a MySQL command tries to execute, but the execution takes longer than the default 'CommandTimeout' of 30 seconds.

To fix the problem, change to MySQLCommand.CommandTimeout to something more useful.