Luuuukke.NET

Bugs, headache, lost hairs... I love IT

System.DBNull when reading excel file

clock December 12, 2010 17:43 by author Luuuukke

If you get DBNull values when reading an excel fil through Microsoft.Jet.OLEDB provider, although cells contain values
there is a simple trick: add a parameter "IMEX=1" to the connection string, to force the cells to be read as text ...

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=FileName.xls;Extended Properties="Excel 8.0;IMEX=1"

 

 

 



Visual Studio XML IntelliSense for URL Rewrite

clock December 12, 2010 17:30 by author Luuuukke

With the new IIS 7 integrated configuration model, you may want to use the add-in URL rewriting

Unfortunately, Visual Studio intellisense does not natively understand the rewrite tags...
So you need to update the schema.. See http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1

To install this schema, you will need to execute a C# Script "cscript UpdateSchemaCache.js",

On my windows 7 , I was not able to run that script, and received the error: There is no script engine for file extension "js"

The solution is here:
http://www.winhelponline.com/articles/230/1/Error-There-is-no-script-engine-for-file-extension-when-running-js-files.html

You need to register the jscript.dll and apply and patch...

Enjoy :-)



Sign in