//
archives

Archive for

SqlHelper ASP.NET (VB)

Before set connectionString in web.config </configuration> <appSettings> <add key=”ConnectionString” value=”server=localhost;uid=sa;pwd=sa;database=DBNAME” /> </appSettings> </configuration> 1. Fill DropDownList Dim ds As DataSet = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings(“ConnectionString”), “sp_name”, “FieldName = 1”) ddl.DataSource = ds ddl.DataBind() ddl.Items.Insert(0, “-please select one-“) Fungsi dari ddlGolongan_Pemilik.Items.Insert(0, “”) untuk memberikan nilai default. 2. Bind DataGrid DataGrid4.DataSource = SqlHelper.ExecuteReader(ConfigurationSettings.AppSettings(“ConnectionString”) , CommandType.Text, strSql); DataGrid4.DataBind();

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 10 other subscribers
December 2011
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Archives

Web Statistic

Blog Stats

  • 187,137 hits