프로그래밍/asp.net(c#)
dtp컨트롤에 데이터 바인드...
괴수고니
2009. 1. 6. 10:18
반응형
string strSql = "Select * From country_def";
OracleCommand cmd = new OracleCommand(strSql,dbConn.OraConn());
cmd.Connection.Open();
OracleDataReader rd = cmd.ExecuteReader();
dpCountry.DataSource = rd;
dpCountry.DataValueField = "country_cd";
dpCountry.DataTextField = "country_name";
dpCountry.DataBind();
rd.Close();
cmd.Connection.Close();
----------------------------------------------------------------------
기초적인 내용인데 자주 까먹는다. ㅠ_ㅠ