tags:

views:

28

answers:

1
+1  A: 

If you have copy-pasted the code, there is at least one error with quoting. It should be like this:

mycom = New SqlCommand("DELETE @PICTUREDATA From pic WHERE 
(NAME = '" + ListBox1.SelectedItem + "')", Me.SqlConnection1

But you should really consider using the SqlCommand.Parameters collection to add your input data. Your code is open to SQL injection attacks.

Albin Sunnanbo