Click to See Complete Forum and Search --> : Delete statment with parameters (asp.net)


PeOfEo
04-22-2003, 08:48 PM
Hey what would a delete sql statement look like with parameters? I have not seen one with them and it would be helpful to see an example. Oh yea ribeyed, I now have email functionality! My hosts smtp server is fixed so I can email people through a data base!

Ribeyed
04-23-2003, 04:13 AM
hi Nick,
well done with the automatic emails :D. To delete you build your code the same as inserting, in your sql you have delete whatever from the table where the feild is equal to your perameters.


strdelete = "Delete tbltable where field=@field"



just follow the same code as inserting :D

PeOfEo
04-24-2003, 08:37 AM
ohh ok thanks, by the way, i figured out how to get 65,000 + characters into any given feild in an access data base :D, Thing is I was having trouble using sql server (i have it running i am still exploring it though) so I decided to test my access and when you set a feild to memo it will not max out at 255 and you change the parameters from verchar 255 to varchar 65,000 or whatever you want it to max out at

PeOfEo
04-25-2003, 08:51 PM
ARGHHHHH. Ok I am trying to use a query string and I have tried setting it up so it selects the name frm a data base where the query string id equals that id, anyways i am putting the name in a feild and then trying to run my delete statement from that but this is not working. I stopped getting errors but It isnt deleting eather. What I am trying to do is when someone who has access to this page enters it he can click on a name on the list and it will redirect him to the other page where the data is deleted in the page load then he will promptly be taken back to the list page. THIS IS DRIVING ME NUTS ITS NOT WORKING =(