1 Replies - 2609 Views - Last Post: 15 March 2013 - 06:41 AM Rate Topic: -----

#1 arjunpunnappurath  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-March 13

I am having an error while trying to establish the connection(asp.net)

Posted 15 March 2013 - 02:07 AM

[code]

SqlConnection con = new SqlConnection("Server=cc_checkConnectionString;Database=cc_check;Trusted_Connectopn=True");
SqlCommand cmd = new SqlCommand("Select * from chumma");
con.Open();
DataSet ds = new Dataset(cmd, con);
SqlDataAdapter da = new SqlDataAdapter();
da.Fill(ds);
con.Close();
[code]

when i am executing the above code i am getting an error of this manner:
[error]
Error 2 The type or namespace name 'Dataset' could not be found (are you missing a using directive or an assembly reference?) C:\Users\trainee\Desktop\Work\Demo\ConsoleApplication3\ConsoleApplication3\Program.cs 133 30 ConsoleApplication3
[error]

help appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: I am having an error while trying to establish the connection(asp.net)

#2 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 284
  • View blog
  • Posts: 1,502
  • Joined: 07-April 08

Re: I am having an error while trying to establish the connection(asp.net)

Posted 15 March 2013 - 06:41 AM

The error tells you everything you need to know. You are not referencing the namespace that includes dataset. I would highly suggest you do some research on debugging and spend some time actually trying to figure out errors yourself. If you do not then you will not make it very far in this industry.

So for reference look here: DataSet and make sure your namespace references are correct.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1