everything is ok.. the connection is on..the page can be loaded... no error...
BUT the data from the database cannot be retrieved... as in.. it just didnt load on screen...
i dont know whats wrong... i have follow all the steps show on a book.. can anyone pls help me?? thks
Two common possibilities. First, do a CTRL-Refresh on the page and make sure you're not just seeing the data your browser cached. Second, your code isn't working. Can't help with the second, since I don't know what book you used or what your code is.
Jeff
|||ok this is my code:
private
void Page_Load(object sender, System.EventArgs e){
sqlConnection1.Open();
dsCustomers1.Clear();
sqlDataAdapter1.Fill(dsCustomers1, "Customers");
if (sqlConnection1.State == ConnectionState.Open)Label4.Text = "SQL Connection is open";
elseLabel4.Text = "SQL Connection is closed";
}
i used the dataAdapter wizard to configure everything, do the dataset and binding too...
|||Where is the code to show content from dsCustomers1? If you're binding it to something like GridView, make sure to?call?Page.DataBind()?or?GridView.DataBind()?before?you?want?to?see?the?data.
No comments:
Post a Comment