943,991 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 3196
  • ASP.NET RSS
May 5th, 2006
0

DataTable

Expand Post »
Hiii I got a error while working with datatables...

The code and Error Are Given below


DataSet ds;
SqlDataAdapter da;
ds=new DataSet();
da=new SqlDataAdapter("Select * from emp",cn);
da.Fill(ds,"emp");
DataTable dt;
DataRow drr;
dt=ds.Tables("emp");



c:\inetpub\wwwroot\CSExs\MoveRec.aspx.cs(109): 'System.Data.DataSet.Tables' denotes a 'property' where a 'method' was expected



Please Help me....
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sravankolla is offline Offline
24 posts
since Apr 2006
May 5th, 2006
0

Re: DataTable

Why bother with the DataSet if you just want a DataTable then just do this:
ASP.NET Syntax (Toggle Plain Text)
  1. SqlDataAdapter da;
  2. da=new SqlDataAdapter("Select * from emp",cn);
  3. DataTable dt;
  4. da.Fill(dt);
  5. DataRow drr;
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
May 6th, 2006
0

Re: DataTable

Quote originally posted by hollystyles ...
Why bother with the DataSet if you just want a DataTable then just do this:
ASP.NET Syntax (Toggle Plain Text)
  1. SqlDataAdapter da;
  2. da=new SqlDataAdapter("Select * from emp",cn);
  3. DataTable dt;
  4. da.Fill(dt);
  5. DataRow drr;
Thanks a lot Mr.hollystyles
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sravankolla is offline Offline
24 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Web Services
Next Thread in ASP.NET Forum Timeline: DropDownList





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC