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
Daniel Rabinovits
NA
34
7.7k
cant fill dataset
Jan 30 2020 10:22 AM
I run the string in Oracle SQL developer and i get data howerver when I try to fill the dataset I get 0 rows and 0 columns.
code is as follows:
string from_date = "01/28/2020";
string to_date = "01/29/2020";
string queryString = "SELECT d.materialcode AS MATCODE, m.itemdesc AS ITEMS, sum(d.quantity) AS QUANTITY FROM tbldispensed d " +
"right outer join tblmasterinventory m on m.materialcode = d.materialcode " +
"WHERE TO_DATE(d.datedispensed, 'yy/mm/dd') BETWEEN TO_DATE('"+ from_date + "', 'mm/dd/yyyy') " +
"AND TO_DATE('" + to_date + "', 'mm/dd/yyyy') " +
"GROUP BY d.materialcode, m.itemdesc";
conn.Open();
OdbcDataAdapter da = new OdbcDataAdapter(queryString, conn);
DataSet ds = new DataSet();
da.Fill(ds);
MessageBox.Show(ds.Tables[0].Rows.Count.ToString());
I get 0 rows....can you help please
Reply
Answers (
4
)
How to clear all control on page webform ?
Emailing from C#