How to delete/edit a query

John Cassell

Well-known member
Joined
Mar 20, 2007
Messages
65
Programming Experience
Beginner
Hi There,

Would someone be able to tell me how to edit/delete a query please?

I originally went to Data>Add Query.

I made one called 'Fillby' but would now like to delete it.

I have no idea where to go?!!

Any help would be greatly appreciated.

Thanks

John
 
Hi There,

It's ok I have found it now.

If anyones interested all I did was...

On my DataSources pane, I right-clicked and went to Edit DataSet with Designer. I then located the Querys attached to my job number.textbox and deleted them.

Thanks

John
 
Queries relevant to a particular table are all stored in the TableAdapter for that table, and this can be seen in the dataset designer surface (double click the dataset in solution explorer or do as you have done - i sometimes find that choosing "Edit in Designer" from the data sources window does nothing.. ? VS bug perhaps..) :D

A tableadapter has 4 main queries, the Select, Update, Delete and Insert. These are intended for use to read and write the datatable en masse from/to the database. Hence the SELECT should probably be "SELECT * FROM table WHERE (primary key)"
The wizard can nornally work out the other 3.

After this you are free to add any number of queries to a table adapter, of any kind, though typically they will not be used to write the datatable back to the database even if they are used to fill it.
 
Back
Top