Thursday, November 19, 2009
Get Discount on Microsoft Certification till 31 December 2009
http://www.prometric.com/microsoft/CareerOffer15.htm?s=MSC15
and fill the registration form & get the code into your inbox.....
Make sure that you should be well prepared before giving exam.
Tuesday, November 17, 2009
EARNING MONEY ONLINE
end and viewing or surfing ads for 20-35 seconds each, after
creating your account in the website or websites you want to
work in. You are paid 1-5 CENTS per ad you view for 20- 35
seconds. Moreover, this is absolutely FREE.
These earning sites are paying your earnings via alertpay or paypal which are online bank accounts. First of all, you can open your accounts at alertpay and paypal for free at https://www.alertpay.com/?qTxj80LOVWjd1j6%2bCoHNbQ%3d%3d and http://www.paypal.com respectively. You can request a check from these banks or get the money by bank transfer after your earnings are transferred to them.
All the work you have to do is click the website links given below and after entering the website, click on "Join" or “Register” button to create your account. After creating your account, log into your account pressing the "Login" button and click on “Surf Ads” or “View Ads” button, to find all the ads given one below the other. Click on the ad link one by one and wait for 20- 35 seconds to get credited. Normally, there is a green tick mark at the top once you are credited or it is witten that you are credited. In some of the websites, after viewing an ad for 20-35 seconds, four numbers are shown and you have to click the number told to get credited for seeing that ad. All the ads should be viewed only once per day. This can be repeated every day. You can check your earnings by clicking on "My Stats" button. Once you reach the minimum payout for the website, click on “cashout” button to get your payment. Please write down the addresses of the websites given below which you want to join somewhere so that you can work in them every day. The number of websites given below, you want to join is up to you but the more websites you join, the more you earn.
Thursday, May 14, 2009
Can foreign key constraints be temporarily disabled using TSQL
ALTER TABLE MyTable NOCHECK CONSTRAINT ALL
-- Enable all table constraints
ALTER TABLE MyTable CHECK CONSTRAINT ALL
-- Disable single constraint
ALTER TABLE MyTable NOCHECK CONSTRAINT MyConstraint
-- Enable single constraint
ALTER TABLE MyTable CHECK CONSTRAINT MyConstraint
Tuesday, April 28, 2009
ASP.NET Client Side State Management
There are two types of state management - server side and client side. In this post I'm going to introduce the client side state management and explain when to choose client side or server side state management.
Client Side State Management Techniques
Client side state management include the following techniques:
- ViewState - ASP.NET track the state of the controls on the pages through
the ViewState. Also, ViewState is used to store small custom values.
Don't hold big custom data object because it will affect the performance of
your web page. - Hidden fields - hidden fields are html input control with a type of hidden -
. They are used to store data in the html without presenting
the data in the browser. The data of hidden field is available when the form is
processed or when using javascript. The ViewState use hidden field to save its
data. You can use the View Source operation (if enabled) to scan the web page's
source and to look for hidden fields. - Query strings - query string state is stored in the URL that is sent to the browser.
Unlike ViewState and hidden fields, the user can see the values without using
special operations like View Source. The parameters are passed in the URL
separated by the & symbol.
For example, in the following URL the query string is built out of two data
parameters, a and b, which hold the values 1 and 2 - http://www.srl.co.il?a=1;b=2. - Cookies - the cookies store their values in the user's browser and the browser
send them back to the server every time a request is performed.
Cookies are maintained during the session of a user in the web site and therefore
can be used in multiple web pages of the site. - Control state - when building custom controls you should use the control state
to save your state if EnableViewState property is set to false.
This is the only reason to use this technique.
How do you know when to choose the client side or server side state management?
When to Choose Client Side State Management
Choose client side for better scalability and support multiple servers. The client side helps to get better scalability by storing state data in the user's browser instead of using the web server's memory. The client side support multiple servers because all the state is located in the browser. This way when you are redirected to another server you don't need to worry about your state.
The thing I wrote doesn't means that you can't use server side state management for the supporting of multiple server. To enable server side state management to be able to support multiple servers you'll have to use centralized state management (state server or store state in database) or you'll have to use techniques like sticky
connection for load balancing.
When to Choose Server Side State Management
Choose server side for better security and to reduce bandwidth and web page's size. Server side state management is more secure. The state is saved on the server and therefore isn't delivered to the client.
Confidential state data shouldn't be used with client side state management. Server side reduce the traffic to and from the client because data isn't sent to the browser and it's saved on the server. You should always remember that using client side state management sends data to the user's browser and that data is sent back to the server
every time. This situation increases bandwidth usage and therefore your application will be less responsive and you'll suffer from performance issues.
Undocumented SQL Server 2000 functions
Encryption in SQL server [pwdencrypt,pwdcompare]
There are some hidden functions in SQL server through which we can encrypt any string and store the same in the table. This will be very helpful in encrypting the user password and other sensitive user data. Encryption supported by SQL server is one way hash. One way hash is nothing but the string encrypted cannot be decrypted. The only way is to compare values with encrypted string.
DECLARE @ClearPIN varchar (255)
DECLARE @EncryptedPIN varbinary(255)
SELECT @ClearPIN = 'test'
SELECT @EncryptedPIN = CONVERT (varbinary (255), pwdencrypt (@ClearPIN))
SELECT pwdcompare(@ClearPIN, @EncryptedPIN, 0)
In the above example @EncryptedPIN will store the cipher Text. The data in this string is not the encrypted string instead it will return the hash code of the supplied plain string.
Saturday, February 28, 2009
SQL Server 2005 Locking Hints
PAGLOCK : Use page-level locks when reading or modifying data.
TABLOCK : Use a table lock when reading or modifying data.
DBLOCK : Use a database lock when reading or modifying data.
UPDLOCK : UPDLOCK reads data without blocking other readers, and update it later with the assurance that the data has not changed since last read.
XLOCK : Use exclusive locks instead of shared locks while reading a table, and use hold locks until the end of the statement or transaction.
HOLDLOCK : Use a hold lock to hold a lock until completion of the transaction, instead of releasing the lock as soon as the required table, row, or data page is no longer required.
NOLOCK : This does not lock any object. This is the default for SELECT operations. It does not apply to INSERT, UPDATE, and DELETE statements.
Sunday, April 27, 2008
Different Options for Importing Data into SQL Server
BCP
This is one of the options that is mostly widely used. One reason for this is that it has been around for awhile, so DBAs have come quite familiar with this command. This command allows you to both import and export data, but is primarily used for text data formats. In addition, this command is generally run from a Windows command prompt, but could also be called from a stored procedure by using xp_cmdshell or called from a DTS or SSIS package.
Here is a simple command for importing data from file C:\ImportData.txt into table dbo.ImportTest.
bcp dbo.ImportTest in 'C:\ImportData.txt' -T -SserverName\instanceName
BULK INSERT
This command is a T-SQL command that allows you to import data directly from within SQL Server by using T-SQL. This command imports data from file C:\ImportData.txt into table dbo.ImportTest.
BULK INSERT dbo.ImportTest
FROM 'C:\ImportData.txt'
WITH ( FIELDTERMINATOR =',', FIRSTROW = 2 )
OPENROWSET
This command is a T-SQL command that allows you to query data from other data sources directly from within SQL Server. By using this command along with an INSERT INTO command we can load data from the specified data source into a SQL Server table.
This command will pull in all data from worksheet [Sheet1$]. By using the INSERT INTO command you can insert the query results into table dbo.ImportTest.
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\ImportData.xls', [Sheet1$])
Here is another example where data is pulled from worksheet [Sheet1$] by using a SELECT * FROM command. Again, by using the INSERT INTO command you can insert the query results into table dbo.ImportTest. The query can be any valid SQL query, so you can filter the columns and rows by using this option.
INSERT INTO dbo.ImportTest
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\ImportData.xls', 'SELECT * FROM [Sheet1$]')
This command is a T-SQL command that allows you to query data from other data sources directly from within SQL Server. This is similar to the OPENROWSET command.
SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\ImportData.xls;Extended Properties=Excel 8.0')...[Sheet1$]
OPENQUERY
Another option is OPENQUERY. This is another command that allows you to issue a T-SQL command to select data and again with the INSERT INTO option we can load data into our table. There are two steps with this process, first a linked server is setup and then second the query is issued using the OPENQUERY command. This option allow you to filter the columns and rows by the query that is issued against your linked data source.
'Jet 4.0', 'Microsoft.Jet.OLEDB.4.0',
'C:\ImportData.xls',
NULL,
'Excel 8.0'
GO
INSERT INTO dbo.ImportTest
SELECT *
FROM OPENQUERY(ImportData, 'SELECT * FROM [Sheet1$]')
Here is yet another option with setting up a linked server and then issuing a straight SQL statement against the linked server. This again has two steps, first the linked server is setup and secondly a SQL command is issued against the linked data source.
'Jet 4.0', 'Microsoft.Jet.OLEDB.4.0',
'C:\ImportData.xls',
NULL,
'Excel 8.0'
GO
INSERT INTO dbo.ImportTest
SELECT * FROM ImportData...Sheet1$
Friday, December 21, 2007
Sending Emails with Dynamic Content
Hi
Code :
try
{
StreamReader sr=new StreamReader("MyContent.htm");
sr = File.OpenText("MyContent.htm");
string result = sr.ReadToEnd();
sr.Close();
}
catch(Exception ex)
{
Response.Write(ex.Message);
return;
}
string MessageBody=result.Replace("
MessageBody=MessageBody.Replace("
MessageBody= MessageBody.Replace("
MailMessage mail = new MailMessage();
mail.Body = MessageBody;
mail.BodyFormat = MailFormat.Html;
mail.From = "YOUR EMAIL ID";
mail.To = "YOUR FRIEND'S EMAIL ID";
mail.Subject = "Dynamic Content Email From "+ txtMyName.Text;
SmtpMail.SmtpServer = "your email server";
SmtpMail.Send(mail);
Message Box in Asp.Net
{
Page currentPage = (Page)HttpContext.Current.Handler;
if (currentPage != null)
{
ScriptManager manager = ScriptManager.GetCurrent(currentPage);
string _msg = "alert('" + message + "');";
if (manager != null && manager.IsInAsyncPostBack)
{
ScriptManager.RegisterClientScriptBlock(currentPage, currentPage.GetType(), "msg", _msg, true);
}
else
{
currentPage.ClientScript.RegisterStartupScript(currentPage.GetType(), "msg", _msg, true);
}
}
}
Sunday, December 16, 2007
When I See You !!
Missing u a lot today…. dont […]

Why do men love women?

Man is the residue of Woman. They are born in the blood, kicking and screaming, because they’ve been wrenched from the best place in existence. So much that Man has to spend the rest of his life in pursuit of the recreation of that consciousness. Right from a warm bed, to a cosy home, to a cushy job, to a luxury car to a… you name it.
A woman is the best concept God has ever sold to a Man. They always talk about the male getting in touch with his feminine side. How come they don’t say that about woman? Hehehe . They don’t need to discover the masculine side, as long as they have something masculine by their side. Women are like cats, you can never own them. But if you treat them like the royalty they are, then their kingdom is yours.
Men need women to fall in love with; women just don’t need a mirror. God created man before woman. But you always make a rough draft before the final masterpiece.
Women are great at communication, the best in fact. A woman can say more in a sigh than a man can in a speech. They get the last word in every argument. Anything a man says after that is the beginning of a new argument. Funny thing is , men can argue forever; only women can make them stop. All she needs to do is start crying.
A man needs a woman to make money, If women didn’t exist then all the money in the world would have no meaning. Think about it, a world without women.. no television, no chocolate, no breakfast, no channel No 5, no Bipasha Basu, no Brad Pitt.. no Madonna, and the ultimate horror – no Playboy !
A man spends his whole life trying to be a man, a woman spends hers trying not to be woman. She’s a mother, a wife, a daughter, a sister, a grandmother etc. A man will always try to be a man first. It is this conflict that is his mystery.
All art serves the feminine. There are very few female poets, that’s because most they become the poem. There are more paintings of women than there are of any other subject. That’s probably because it’s the only time a man can take his won sweet time with various women without the guilt.
Men love naked women. Men are supposed to love them! How’s that for getting in touch with your feminine side? Most “married” or “faithful” men love to look at pictures of naked women. That doesn’t mean they’re cheating, it’s just that they can’t get enough of the feminine.
A woman will not own just one pair of shoes, will she?
So will man ever “figure” out women? I don’t think so. We’re not supposed to. Man is like the Earth, he just needs to keep on spinning to keep things going. The woman is the Galaxy, she keeps the orbit right, the seasons changing, the weather favorable and the sun always shining.