Configuring ASP.NET website to use SQL Server for Session state

Today i was working on an application. So thought of storing the session in sql server. I will be installing on my notebook, my notebook name is yj-NB. I have set sa user password as sa123 on database. Here are the steps to follow: Step 1: Here is the code to add in web.config; <sessionState [...]

SQL DML & DDL

SQL Data Manipulation Language (DML): DML is a syntax for executing queries and DML component of SQL comprises have four basic statements: SELECT – Retrieve rows from tables UPDATE – Modify the rows of tables DELETE – Remove rows from tables INSERT – Add new rows to tables. SQL Data Definition Language (DDL): DDL is [...]

SQL @@ROWCOUNT

Returns the number of rows affected by the last statement. It will let you to do a checking on the record you updated. If the number of rows is more than 2 billion, use ROWCOUNT_BIG. Example USE DB2008; GO UPDATE User SET JobTitle = ‘Manager’ WHERE UserID = ‘u10021′ IF @@ROWCOUNT = 0 PRINT ‘Warning: [...]

SQL Split Function for string

This SQL Split Function is use to SPLIT a sentences based on the Delimeter. Delimeter is a string character used to identify substring limits. –Below is Split Function in SQL DECLARE @NextString NVARCHAR(40) DECLARE @Pos INT DECLARE @NextPos INT DECLARE @String NVARCHAR(40) DECLARE @Delimiter NVARCHAR(40) SET @String =’Paro|Haa|Thimphu’ SET @Delimiter = ‘|’ SET @String = [...]

Regular Expression to Validate a Decimal Number

I had always used to ajaxToolkit MaskedEditExtender for entering decimal value. But I was interested to do the other way round without using ajaxToolkit MaskedEditExtender. Finally I found the solution using Regular Expression. I wanted 4 digit before decimal point and 3 digits after decimal point. Below is how I did it: <asp:TextBox ID=”txtAmount” runat=”server”></asp:TextBox> [...]

Druk Air’s third aircraft

5 June, 2011 – With a colourful chipdrel ceremony, the national airline welcomed its third aircraft to Bhutan on Saturday. Drukair has leased a 48-seater European built aircraft to operate between its short haul routes, such as Kolkata, India, and Kathmandu, Nepal. The lease includes the option to purchase the aircraft. The aircraft will be [...]

IPTABLE Linux Firewall

Linux have its own firewall package named iptables. iptables are installed by default. iptables file is located in /etc/sysconfig/iptables. Unfortunately, the /etc/sysconfig/iptables file doesn’t support the loading of modules, so you’ll have to add the statements to your /etc/rc.local file which is run at the end of every reboot. Now lets check what modules are [...]

Install Clamav Antivirus

Before you start installing Clamav Antivirus in your Linux box, please add the extra repository for yum. Install Dag repository, and how to install, go to my post Add Repository for yum. yum – -enablerepo=dag install clamav -y After installing there is few changed needed in configuration file. vim /etc/freshclam.conf #locate the line below and [...]

chown

chown stands for Change Ownership. To change the ownership and group of files and directories Change ownership of a single file chown : eg. chown root:root message.txt Change ownership of a directory and all sub files and directories chown -R : eg. chown -R root:root photo

Warning/Deprecated Error in bbPress

After installing bbPress, if you get a Deprecated/Warning error message then please check your php Version. bbPress don’t seem to support latest version of php. bbPress is doing this, has been “deprecated” (made obsolete) in the new version of PHP. Everything will still work, but in the future PHP may change and these functions will [...]

Page 2 of 712345...Last »

Follow Me

Weather

Thimphu: -9° C

Condition: Clear

Sunrise: 8:34 am

Sunset: 7:59 pm

Time: 08:06:57 am

Archives

Users: 5 Guests