Forum Moderators: open

Message Too Old, No Replies

Relatioanl Database

Db, Connection

         

justify

7:59 am on Jan 27, 2005 (gmt 0)

10+ Year Member



HiEveryBody, I am using SQL Server 2000 and I have two type Tables. First table is "SELECT * FROM PRODUCTS". Second table is
"SELECT * FROM DETAIL". First Query Like This. There is no problem.

SqlConnection Con = new SqlConnection("Server=web;uid=sa;pwd=; database=followProduct");
SqlDataAdapter adp = new SqlDataAdapter("SELECT * FROM PRODUCTS",Con);
DataSet ds = new DataSet();
adp.Fill(ds);
MyDataGrid1.DataSource = ds;
MyDataGrid1.DataBind();

I want to compare two fields that is PRODUCTS_CODE of the PRODUCTS table and is DETAIL_ID of the DETAIL table.
And also I want to show DETAIL_NAME fields in DropDownListBox.
if PRODUCTS_CODE equal DETAIL_ID than selected DETAIL_NAME which shown the DropDownListBox. How can I do it?
Can you have any Example or documant? Please Help?

TheNige

8:02 pm on Jan 27, 2005 (gmt 0)

10+ Year Member



Do a search on Google for "SQL Tutorial" click the first result.