title: Problem with SqlConnection, ASP.net C#
body: <p>I have the following C# code:</p>
  
  <pre><code>public string TargetDate()
  {
      SqlConnection con = 
          new SqlConnection("Server=localhost;Database=Timer;Trusted_Connectopn=True");
      SqlCommand cmd = new SqlCommand("select * from Timer");
      con.Open(); 
  
      DataSet ds = new DataSet(cmd,con); 
      SqlDataAdapter da = new SqlDataAdapter(); 
      da.Fill(ds); 
      con.Close(); 
  }
  </code></pre>
  
  <p>but I get error at the: <code>new DataSet(cmd,con); ...</code></p>
  
  <blockquote>
    <p>the error: CS1502: The best overloaded
    method match for </p>
  
  <pre><code>'System.Data.DataSet.DataSet(System.Runtime.Serialization.SerializationInfo,
  </code></pre>
    
    <p>System.Runtime.Serialization.StreamingContext)'
    has some invalid arguments</p>
  </blockquote>
  
  <p>What is could be the problem?</p>