Other Software > Developer's Corner
ASP.NET and C# webform. Need help with query to DB
h0meopathic:
--- Code: C# ---SqlConnection conn; DataSet dataSet = new DataSet(); SqlDataAdapter adapter; SqlCommandBuilder commandBuilder; conn = new SqlConnection("Server=localhost\\SqlExpress; Database=HealthFair;" + "Integrated Security = True"); adapter = new SqlDataAdapter("SELECT Slot, COUNT(Slot) AS SlotCount FROM AppointmentName " + "GROUP BY Slot HAVING COUNT(Slot) > 1", conn); adapter.Fill(dataSet); commandBuilder = new SqlCommandBuilder(adapter); adapter.Update(dataSet);
Now how do I get the data into objects so I can determin which records in Slots to cut off?
Navigation
[0] Message Index
[*] Previous page
Go to full version