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
Tushar Pawar
NA
26
11k
sub query value not fill into the dataset
Dec 5 2012 6:42 AM
OleDbConnection OraCon = new OleDbConnection();
DataSet ds = new DataSet();
OleDbCommand cmd = new OleDbCommand();
string connectionstr = ConfigurationManager.ConnectionStrings["augb"].ConnectionString;
OraCon.ConnectionString = connectionstr;
OraCon.Open();
string sql = "select u.LOCATION,count(c.CHAR_CUST_REFERENCE_NO) as Total,(select count(c.CHAR_CUST_REFERENCE_NO) from customers c inner join users u on(c.NUM_CREATED_BY = u.VCHAR_LAPTOPNO) and to_date(c.DT_CREATED_ON)= to_date(sysdate) ) as Today from customers c inner join users u on(c.NUM_CREATED_BY = u.VCHAR_LAPTOPNO) group by u.LOCATION";
cmd = new OleDbCommand(sql, OraCon);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(ds, "cust");
if (ds.Tables[0].Rows.Count >= 1)
{
GridView1.DataSource = ds;
GridView1.DataMember = ds.Tables[0].TableName;
GridView1.DataBind();
}
Reply
Answers (
2
)
Use Multi-level inheritance and garbage collector paralelly in .net
object oriented programming