Tuesday, July 24, 2012

ACESS NOT IN Query Issue

Not in statement in access returns no results even I know well that there is some records not in the sub query table.

After searching this issue the only reason I found, if there is null values in the sub query selected list
Then the (not in sub query) statement not working in the way it should
To make not in statement work correctly in MS-Access you should remove the null values then it will return correct results

SELECT *
FROM TABLE1
WHERE TABLE1.C1 NOT IN
(SELECT TABLE2.C2 FROM TBALE2);

Thursday, July 5, 2012

How to disable Asp.Net button after been clicked

1st step: Create Java script function to disable the button and added to the web page


<script language="javascript">

function disableBtn(btnID, newText) {


var btn = document.getElementById(btnID);


setTimeout("setImage('"+btnID+"')", 10);


btn.disabled = true;


btn.value = newText;


}


</script>

2nd step:  Add script to the button

OnClientClick="disableBtn(this.id, 'Upload data ')" UseSubmitBehavior="false"