TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi subramanian
NA
799
574.5k
I need retrieve time from sqlserver to asp.net using c# in a textbox
Apr 11 2012 2:24 AM
i need retrieve time from sqlserver to asp.net using c# in a textbox.........
protected void Page_Load(object sender, EventArgs e)
{
SqlDataReader sdr = null;
string qry = "select logintime from logintime";
ds = net.GETDS(qry);
da.Fill(ds, "logintime");
// TextBox1.Text = ds.Tables["logintime"].Rows[indes]["logintime"].ToString();
while (sdr.Read())
{
TextBox1.Text = sdr["logintime"].ToString();
}
}
}
it throws the error like this ( The SelectCommand property has not been initialized before calling 'Fill'.)
Reply
Answers (
6
)
CAN SOMEONE CORRECT THE FOLLOWING CODE FOR ME
Grouping in MVC3 Webgrid