28 February 2011

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

You have encountered the above error message in x64 platform, such as Windows 7?

Well, don't waste your time to find Jet Ole DB updates, it's not related with any update at all.

The solution to fix this issue is to change the target platform of your development from "AnyCPU" to "x86".

a). Go to project's properties.
b). Select the "Compile" tab.
c). Click the "Advanced Compile Options..." button.
d). Select "x86" in "Target CPU:".
e). Please make sure you do the same for Debug mode and Release mode.

18 February 2011

How to retrieve the partitions name of a MySQL table?

Select *
From Information_Schema.Partitions
Where table_schema = 'Schema_Name' And
table_name = 'Table_Name'
Order By partition_name Asc;

How to add partition to MySQL table?

Alter Table Table_Name
Partition By Range (Field_Name)
(
Partition `201101` Values Less Than (201102),
Partition `201102` Values Less Than (201103),
Partition `201103` Values Less Than (201104),
Partition `201104` Values Less Than (201105),
Partition `201105` Values Less Than (201106),
Partition `201106` Values Less Than (201107),
Partition `201107` Values Less Than (201108),
Partition `201108` Values Less Than (201109),
Partition `201109` Values Less Than (201110),
Partition `201110` Values Less Than (201111),
Partition `201111` Values Less Than (201112),
Partition `201112` Values Less Than (201201)
);

The `201101` represents the partition name while the 201102 represents the Less Than value.