ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

ASP.NET and C# webform. Need help with query to DB

<< < (2/2)


--- 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?


[0] Message Index

[*] Previous page

Go to full version