By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,140 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,140 IT Pros & Developers. It's quick & easy.

Change the form name on page load with the data base details

P: 1
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)


DOMain : Form Name (I.E) Text
DO# 200100: is the database Table Column ID

i used this code but no use

Expand|Select|Wrap|Line Numbers
  1. public DOMain()
  2.         {
  3.             InitializeComponent();
  4.             DataTable dt3 = new DataTable();
  5.             OleDbConnection conn1 = new OleDbConnection("connection string");
  6.             conn1.Open();
  7.             OleDbCommand c = new OleDbCommand("select * from dbo_PO where DOC_NO = '"+DebitOrder+"'", conn1);
  8.             OleDbDataAdapter d = new OleDbDataAdapter(c);
  9.             d.Fill(dt3);
  10.             if(dt3.Rows.Count>0)
  11.             {
  12.                 this.Text = "sathish" + dt3.Rows[0]                         ["DOC_NO"].ToString();
  13.             }
  15.         }
Dec 14 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 12,427
Your question is vague and unclear, I have no idea what you're trying to do.
Dec 14 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.