topical media & game development

talk show tell print

professional-xml-19-Listing-19-13.txt / txt



  [WebMethod(CacheDuration=45)]
  public DataSet GetCustomers()
  {
     SqlConnection conn;
     SqlDataAdapter myDataAdapter;
     DataSet myDataSet;
     string cmdString = "Select * From Customers";
  
     conn = new SqlConnection("Server=localhost;uid=sa;pwd=;database=Northwind");
     myDataAdapter = new SqlDataAdapter(cmdString, conn);
  
     myDataSet = new DataSet();
     myDataAdapter.Fill(myDataSet, "Customers");
  
     return myDataSet;
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.