Silverlight / WPF - Where do I run a Dataset query

Asked By David on 27-Jan-11 04:51 PM
I have a Dataset/Tableadapter DeleteCommand query that deletes one row of data only from the database by entering the prikey value number and it works perfect when I execute it in Query Builder.
How or where do I connect this query to a form to perform this operation on my project?
Do I need a Gridview form or box of some sort to make it work?
This is visual studio 2008
I am using Server explorer to DataBase



You posted this in the Silverlight/WPF forum - Robbe Morris replied to David on 27-Jan-11 08:16 PM

If you are using Silverlight, all of this database interaction needs to be placed in a WCF service.  Silverlight doesn't have the System.Data namespace or the ability to directly connect to a database via ADO.NET.
David replied to Robbe Morris on 28-Jan-11 04:30 AM
Thanks for the reply Robbe

I have no idea what WCF is and not sure if I am using Silverlight.
My project is made using Xaml forms and reports etc in visual studio 2008
I used a Access Database on my c: drive to use the tables for my info and this is shown on my server explorer
as a data connection.
I have DataSets and this is where my query builder Delete command is which does the job perfect deleteing the selected prikey number.
Like I said I need to be able to put the query command onto a button on a form to delete from my table

Thanks for your help

David replied to Robbe Morris on 28-Jan-11 03:14 PM
Sorry sent it twice
David replied to David on 30-Jan-11 01:30 PM
HI All

This has solved the problem it works o/k

Private Sub BindingNavigatorDeleteItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click

If (Me.Validate() And Not (COURSES_PLAYEDBindingSource Is Nothing)) Then
If (MsgBox("Delete?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes) Then

End If
End If
End Sub
End Class

Thanks all