Wednesday, February 8, 2012

Retrieve Selected rows from database


SELECT * From Schem.Table1 WHERE Name = 'Ramneek'

This query retrieves the Name details from the Table1 where the name is ramneek.

Ramneek Sharma

Change the name of the column while displaying the data from database


SELECT 'Name'= EmpName, 'ID NO' = EmpID From Schema.Table1

Ramneek Sharma

Selecting specific columns form the database


SELECT Name,Age,RollNo from Schema.Table1

Ramneek Sharma

SQL server displaying all the contents of the table


Select * from Schema.table_name

Select * from ramneek.table1

where ramneek is the schema of the created database in which the table1 is stored.

Ramneek Sharma

Garbage Collection

Garbage Collection is a process that automatically frees the memory of objects that are no more in use.

Ramneek Sharma

Software Development Life Cycle (SDLC) Errors


Errors types that might get introduced in a Software Product.

Leakage Errors : These errors are not detected at a particular stage in the development cycle of the software and are carried forward to the next stage.

New Errors ; With leakage errors new errors might get raised at a particular stage.

Compatibility Errors : Two or more modules may work correctly when isolated but they might get exception when they are integrated.

Ramneek Sharma

Quality audit.


Quality audit is a process which helps examine and review quality activities like walkthroughs and inspections to dtermine the compliance of the quality activities with quality specifications.

Ramneek Sharma

Basic Quality Control Activities.


Quality Control activities includes Inspection,Testing,Checkpoint review.

Inspection ; It includes the structured review by checking every module of SDLC using checklists,It helps in identifying major threats.

Testing : Refers to the process of checking all positive and negative features.

Checkpoint review : Refers to the questions raised to check the major problem areas of the developed system .

Ramneek Sharma

Quality Control

Quality control is the process by which the quality of the product is compared with specific standards and action is taken if the quality does not matches the applicable standards.Quality Control is the detection of defects rather than their prevention.

Ramneek Sharma.

Tuesday, February 7, 2012

Best source to learn DotNet


The best source to learn DotNet :

MSDN Library.

http://msdn.microsoft.com

DotNet Spider.

www.dotnetspider.com


Ramneek Sharma

Copyind Files or Directories using c#

public class SimpleFileCopy
{
static void Main()
{
string fileName = "test.txt";
string sourcePath = @"C:\Users\Public\TestFolder";
string targetPath = @"C:\Users\Public\TestFolder\SubDir";

Use Path class to manipulate file and directory paths.
string sourceFile = System.IO.Path.Combine(sourcePath, fileName);
string destFile = System.IO.Path.Combine(targetPath, fileName);

if (!System.IO.Directory.Exists(targetPath))
{
System.IO.Directory.CreateDirectory(targetPath);
}

System.IO.File.Copy(sourceFile, destFile, true);

if (System.IO.Directory.Exists(sourcePath))
{
string[] files = System.IO.Directory.GetFiles(sourcePath);

{
fileName = System.IO.Path.GetFileName(s);
destFile = System.IO.Path.Combine(targetPath, fileName);
System.IO.File.Copy(s, destFile, true);
}
}
else
{
Console.WriteLine("Source path does not exist!");
}

Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}

Source MSDN


Ramneek Sharma

Move Files using c#

string filesource = @"C:\file.txt";
string filedestination = @"C:\Myfolder\Ramneek\file.txt";

System.IO.File.Move(filesource,filedestination);



Ramneek Sharma

Displaying FileDialog Box


OpenFileDialog openFileDialog1 = new OpenFileDialog();

openFileDialog1.InitialDirectory = "c:\\" ;
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*" ;
openFileDialog1.FilterIndex = 2 ;
openFileDialog1.RestoreDirectory = true ;

if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
if ((myStream = openFileDialog1.OpenFile()) != null)
{

}
}
catch (Exception ex)
{
MessageBox.Show("Un-Expected Error : " + ex.Message);
}
}
}



Ramneek Sharma

Wednesday, February 1, 2012

Hyperlink through web page using anchor tag

Hyperlink through web page using anchor tag.

<a href="www.google.com">Google Page </a>

Ramneek Sharma

Set the Background colour of the HTML page

Set the Background colour of the HTML page

<body bgcolor="red">



Ramneek Sharma.