hi everyone, I want to know how to change the form name on load with database table column id
i mean my form name should be
DOMain (DO# 200100)
Here,
DOMain : Form Name (I.E) Text
DO# 200100: is the database Table Column ID
i used this code but no use
i mean my form name should be
DOMain (DO# 200100)
Here,
DOMain : Form Name (I.E) Text
DO# 200100: is the database Table Column ID
i used this code but no use
Code:
public DOMain()
{
InitializeComponent();
DataTable dt3 = new DataTable();
OleDbConnection conn1 = new OleDbConnection("connection string");
conn1.Open();
OleDbCommand c = new OleDbCommand("select * from dbo_PO where DOC_NO = '"+DebitOrder+"'", conn1);
OleDbDataAdapter d = new OleDbDataAdapter(c);
d.Fill(dt3);
if(dt3.Rows.Count>0)
{
this.Text = "sathish" + dt3.Rows[0] ["DOC_NO"].ToString();
}
}
Comment