SQL Server Queries, Running under a process
Some time it requires to know what actually the SQL Server is executing under a process. So that we can know where exactly the procedure/query is stuck right now. Which helps us to know whether we can kill the running process or not. By making use of the inputbuffer it gives only the procedure (with parameteres) currently executed by the process, in the case of a procedure. Below query gives you the excat query executed by SQL Server.
C#/Asp.Net - Uploading multiple files like Gmail/Orkut
There are several ways of supporting multiple file upload in asp.net based on the requirements. Below are few ways that we can do coding to support multiple file uploads in asp.net:
1. If we fix number of files to be uploaded, we can place that many FileUpload control while designing the page.
So lets see the complete code. Screenshots of the code:
T-SQL - Checking for Unicode characters
Here is a code in T-SQL which will check if a string contains UNICODE characters:
Lets create a table variable:
declare @temp table (Name varchar(100), Address1 nvarchar(200))
Now we will insert two records, one of which contains ascii and one non-ascii character.
T-SQL - Password Encryption/Decryption
Here is a sample code which will show how to encrypt/decrypt password using password phrase in T-SQL:
We will hard code password phrase and and original password then we will encrypt the password and store it in a variable.
DECLARE @origPass NVARCHAR(50),