Tuesday, April 15, 2014

Microsoft.Ace.OLEDB.12.0 Provider Not Registered

Recently while trying to import some data from Excel onto SQL on a new machine I got the following error at SQL Server Import and Export Wizard Step 2. After doing some searching found the solution is to install Office 2007 Data Connectivity Components System Driver.

image

If you need to  get it fixed use the following link to get it from Microsoft Download Center.

http://www.microsoft.com/en-us/download/details.aspx?id=23734

Sunday, January 05, 2014

Finding Number of Records in SQL Tables

By using the following query you will be able to get all the tables with at least one record in the selected database. It will be handy when you needed to get an idea of the number of records in a database. This uses two SQL Server system views, namely SysObjects and SysIndexes.





  1. SELECT sysobjects.name AS [Table Name],
  2.         MAX(sysindexes.rows) AS [Number of Records],
  3.         sysobjects.crdate AS [Created Date],
  4.         sysobjects.refdate AS [Referenced Date]
  5. FROM sysobjects
  6. INNER JOIN sysindexes ON sysobjects.id = sysindexes.id
  7. WHERE sysobjects.xtype = 'U' -- Filtering all the User Tables.
  8.     AND sysindexes.rows > 0 -- Getting all the tables having at least one reoord.
  9. GROUP BY sysobjects.name,
  10.     sysobjects.crdate,
  11.     sysobjects.refdate
  12. ORDER BY 2 DESC -- Ordering by the number of records in table.




 

Above query will bring the following results on the Northwind database.

image

Friday, November 01, 2013

Resetting Windows XP Mode

Recently I had a problem using Windows XP mode simply because the password for Windows XP mode was not working.This can happen when Windows XP mode password was changed in Windows XP Mode or when the Windows XP Mode was created from another user account to the one currently logged into the physical machine.

One way to fix this is by opening Windows XP Mode Windows Virtual PC Settings and deleting saved credentials. But in my case there were no saved credentials so my button was disabled.

clip_image002

Second way to fix this is by uninstalling Windows XP Mode and reinstalling it.

Third way is a quicker way to do this by simply cleaning the virtual machine files in folder “C:\Users\Administrator\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines”. Make sure you are only deleting the files relevant to Windows XP Mode.

clip_image002[5]

Then when you relaunch Windows XP mode, it will say that some of the required files are missing and will prompt to create a new environment. When you press “Create New” it will start the wizard to create a brand new Windows XP Mode.

clip_image001

If it generates any errors, you should try deleting the virtual machine file found in “<User Folder>\Virtual Machines”clip_image002[7]

After finishing the wizard you will get a new Windows XP Mode.

clip_image001[5]clip_image001[7]

clip_image001[21]clip_image001[19]clip_image002[9]clip_image002[14]

Tuesday, July 02, 2013

HTTP Error 404.13 – Not Found – The request filtering module is configured to deny a request that exceeds the request content length.

Request Filtering

I recently got this error in one of my applications. When troubleshooting, I found my application is configured to have the default value of 30000000 Bytes for the content length, which was not sufficient for me in some of the file uploading functionalities.

Simply adding / increasing the number in the configuration file corrected this error.

Request Content Length in Bytes.

Default Value – 30000000 Bytes (~28MB)

Maximum Value – 4284229877 Bytes (3.99GB)





  1. <system.webServer>
  2.   <security>
  3.     <requestFiltering>
  4.       <requestLimits maxAllowedContentLength="100000000"></requestLimits>
  5.     </requestFiltering>
  6.   </security>
  7.   ...
  8. </system.webServer>




 

To obtain more information read this article.