1
Reply

tableadapter GetData() query returns zero rows

Andy

Andy

Oct 11 2007 9:59 PM
15.7k

Hi all,

I can't figure this out.  I added a dataset to my project.  It has one table.  Why doesn't this code work?
If  I test the GetData() query inside the designer, it returns 1 row.  But here, the rows returned are zero.  Anybody know what I am missing?

myTableAdapter ta = new myTableAdapter();
myDataTable dt = new myDataTable();
dt = ta.GetData();
int numRows = dt.Rows.Count;

Thanks,

Andy


Answers (1)