By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,899 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,899 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)

Here,

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.             }
  14.  
  15.         }
Dec 14 '12 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,359
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.