List Info

Thread: C-Sharp (C#) Group: dataset not populated whereas Query Analyzer generates rows using the same query




C-Sharp (C#) Group: dataset not populated whereas Query Analyzer generates rows using the same query
country flaguser name
United States
2007-05-14 06:20:24
Hi ,

running the query ,say, strQuery , in a query analyzer
generates
results returning rows ...but folowing code does'nt make it
the
same ...

strQuery = " some query which works in query
analyzer";
DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAadapter(ds,connetion);
ds.tables.add("tablename");
adapter.fill(ds,"tablename"); //it takes 10
seconds at min
....
...
...
int nRows = ds.Tables[0].Rows.Count; // nRows is always 0
showing no
record

any help ,,,,, 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://g
roups.google.com/group/C_Sharp?hl=en
-~----------~----~----~----~------~----~------~--~---


C-Sharp (C#) Group: Re: dataset not populated whereas Query Analyzer generates rows using the same q
country flaguser name
United States
2007-05-21 10:13:53
An example of the actual query would be nice; both in code
and analyzer.
What RDMS?  What Analyzer?  

Jeremy Schreckhise, M.B.A.

-----Original Message-----
From: C_Sharpgooglegroups.com [mailto:C_Sharpgooglegroups.com] On Behalf
Of Madni
Sent: Monday, May 14, 2007 6:20 AM
To: C-Sharp (C#)
Subject: C-Sharp (C#) Group: dataset not populated whereas
Query Analyzer
generates rows using the same query


Hi ,

running the query ,say, strQuery , in a query analyzer
generates
results returning rows ...but folowing code does'nt make it
the
same ...

strQuery = " some query which works in query
analyzer";
DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAadapter(ds,connetion);
ds.tables.add("tablename");
adapter.fill(ds,"tablename"); //it takes 10
seconds at min
....
...
...
int nRows = ds.Tables[0].Rows.Count; // nRows is always 0
showing no
record

any help ,,,,, 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://g
roups.google.com/group/C_Sharp?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )