Wednesday, November 4, 2009

problem oledb reader returning empty cell value c#

f you have a problem reading an excel cell using OleDb reader within an excel sheet where a value is shown on the excel sheet but the reader is returning an empty value.
In the connection string try adding IMEX=1 in the extended properties for example

@"Provider=Microsoft.Jet.OleDb.4.0; data source = j:\yourfile\ ;Extended Properties= 'Excel 8.0;HDR=No;IMEX=1'"

Labels: , , ,

problem OleDbConnection c# excel

If you have a problem reading an excel cell using OleDb reader within an excel sheet where a value is shown on the excel sheet but the reader is returning an empty value.
In the connection string try adding IMEX=1 in the extended properties for example

@"Provider=Microsoft.Jet.OleDb.4.0; data source = j:\yourfile\ ;Extended Properties= 'Excel 8.0;HDR=No;IMEX=1'"

Tuesday, October 27, 2009

problems asp.net £ pound signs iis



If you have a problem with £ signs displaying incorrectly on your web server and the web page has charset=utf-8 encoding but on the web page the character is displayed as
⣠then you need to make sure all the encoding on the asp.net set up in IIS is set to
utf-8
see above

Labels: , , , ,

Tuesday, October 6, 2009

How To Fix Windows Update Error 80072EFD

The answer is to disable proxy server of Windows Update:

1) Open an elevated Command Prompt window – click the Vista Orb (Start button), type command prompt, right click the Command Prompt shortcut in the Program list and select Run As Administrator.

2) To display the current proxy setting of Windows Update, execute this command:
netsh winhttp show proxy

3) If the proxy server is shown in the “show proxy” result, then execute this command to disable the Windows Update proxy setting:
netsh winhttp reset proxy

The “reset proxy” will effectively configure WinHTTP proxy server setting to DIRECT (meaning to direct access Internet and no relying on a proxy server).

Labels:

Friday, September 25, 2009

/* Simplifies onload, you will no longer have to add an onload event call just call addLoadEvent */
function addLoadEvent(func,arg){

if (!arg){
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
else{/*if the onload event has an argument/parameter cater for that*/
if (arg){
oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func(arg);
}
window.onload = function() {
oldonload();
func(arg);
}
}
}
}
function loadGAScript(){
/*Check browser for Dom compatibility*/
if (!document.getElementsByTagName) return false;
/*Determines whether the page is using a secure or unsecure protocol*/
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
/*Writes in the script to the document head*/
var gaScript = document.createElement("script");
gaScript.setAttribute("src",gaJsHost +"google-analytics.com/ga.js");
gaScript.setAttribute("type","text/javascript");
var domHead = document.getElementsByTagName("head")[0]
domHead.appendChild(gaScript);
}
loadGAScript();

/*Calls the analytics function*/
function callGA(){
var pageTracker = _gat._getTracker("UA-10821701-1");//change this value to your id
pageTracker._initData();
pageTracker._trackPageview();
}

addLoadEvent(callGA);

javascript to detect flash version

function getFlashVersion(){
// ie
try {
try {
// avoid fp6 minor version lookup issues
// see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-
internet-explorer-flash-6/
var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
try { axo.AllowScriptAccess = 'always'; }
catch(e) { return '6,0,0'; }
} catch(e) {}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version')
.replace(/\D+/g , ',').match(/^,?(.+),?$/)[1];
// other browsers
} catch(e) {
try {
if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
return (navigator.plugins["Shockwave Flash 2.0"] ||
navigator.plugins["Shockwave Flash"]).description.replace
(/\D+/g, ",").match(/^,?(.+),?$/)[1];
}
} catch(e) {}
}
return '0,0,0';
}

var version = getFlashVersion().split(',').shift();
if(version < 10){
alert("Lower than 10");
}else{
alert("10 or higher");
}

Labels:

Monday, June 22, 2009

Parser Error Message: Could not load type

I've had the same issue...try checking the version of .net being used by IIS on your website. if you're developing in .NET 2.0 and it's set to 1.1 you'll get this message