select * from sys.databases
select * from sys.tables
To see all the column of table
select * from sys.all_columns where [object_id]= OBJECT_ID (N'dbo.emp')//Emp is table name
Friday, June 11, 2010
Wednesday, June 9, 2010
Change Text/Image Periodically in Windo application in C#
I have taken a Window Form and add a Label
and a Timer I want Label text should be
change after 5 second
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Timer tm = new Timer();
tm.Tick += new EventHandler(tm_Tick);
tm.Interval = (1000) * (3);
tm.Enabled = true;
tm.Start();
}
int i = 0;
void tm_Tick(object sender, EventArgs e)
{
i++;
Timer tm = (Timer)sender;
if (i == 1)
label1.Text = "NSE";
else if (i == 2)
label1.Text = "BSE";
else if (i == 3)
{
label1.Text = "NCDX";
}
else if (i == 4)
{
label1.Text = "MCX";
i = 0;
}
}
}
and a Timer I want Label text should be
change after 5 second
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Timer tm = new Timer();
tm.Tick += new EventHandler(tm_Tick);
tm.Interval = (1000) * (3);
tm.Enabled = true;
tm.Start();
}
int i = 0;
void tm_Tick(object sender, EventArgs e)
{
i++;
Timer tm = (Timer)sender;
if (i == 1)
label1.Text = "NSE";
else if (i == 2)
label1.Text = "BSE";
else if (i == 3)
{
label1.Text = "NCDX";
}
else if (i == 4)
{
label1.Text = "MCX";
i = 0;
}
}
}
Tuesday, June 1, 2010
Auto Complete Option in ComboBox in C#
ArrayList ObjArrayList=new ArrayList():
private void Form_Load(object sender, EventArgs e)
{
ObjArrayList.Add("a");
ObjArrayList.Add("aa");
ObjArrayList.Add("b");
ObjArrayList.Add("bb");
ObjArrayList.Add("c");
ObjArrayList.Add("cc");
ObjArrayList.Add("d");
ObjArrayList.Add("dd");
OR
cmbSymbol.DataSource = ObjArrayList;// You can Give DataSource Also
ComboBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
ComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
AutoCompleteStringCollection dataSymbols = new AutoCompleteStringCollection();
for (int i = 0; i < ObjArrayList.Count; i++)//If You are using DataSet then user Ds.Tables[0].Rows.Count
{
dataSymbols.Add(ObjArrayList[i].ToString());
}
ComboBox1.AutoCompleteCustomSource = dataSymbols;
}
private void Form_Load(object sender, EventArgs e)
{
ObjArrayList.Add("a");
ObjArrayList.Add("aa");
ObjArrayList.Add("b");
ObjArrayList.Add("bb");
ObjArrayList.Add("c");
ObjArrayList.Add("cc");
ObjArrayList.Add("d");
ObjArrayList.Add("dd");
OR
cmbSymbol.DataSource = ObjArrayList;// You can Give DataSource Also
ComboBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
ComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
AutoCompleteStringCollection dataSymbols = new AutoCompleteStringCollection();
for (int i = 0; i < ObjArrayList.Count; i++)//If You are using DataSet then user Ds.Tables[0].Rows.Count
{
dataSymbols.Add(ObjArrayList[i].ToString());
}
ComboBox1.AutoCompleteCustomSource = dataSymbols;
}
Subscribe to:
Posts (Atom)
Mat Table Angular
Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...
-
CriteriaOperator criteria = new BinaryOperator("Age", 30, BinaryOperatorType.Greater); CriteriaOperator criteria = CriteriaOperato...
-
SortingCollection sc = new SortingCollection(); sc.Add (new SortProperty("field on which you want to sort",DevExpress.Xpo.DB.Sorti...
-
Here ItemName will be Enable/Disable According to IsApplicable Property Assembly: DevExpress.XtraLayout; DevExpress.ExpressApp.Win.Layou...