1
Answer

tableadapter GetData() query returns zero rows

Andy

Andy

17y
15.7k
1

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)