|
Subject:
|
Delete Data from a SQL Database using vb 2005
|
|
Posted By:
|
sahmed1983
|
Post Date:
|
12/1/2006 7:12:48 AM
|
Hi Im learning VB 2005
I can add data into SQL 2005 Database using VB 2005, Could you plz help me , How can I Delete data from a User Input?
Example
txtCustID= UserInput
Waiting for reply
|
|
Reply By:
|
anubisascends
|
Reply Date:
|
12/7/2006 6:28:41 AM
|
you could try running a delete query to remove the data
example:
strQueryDelete = "DELETE [columnName] FROM [tableName] WHERE [columnName]=" & txtCustID & ";"
then just run the query in code with a button click handler.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Albert Einstein US (German-born) physicist (1879 - 1955)
|
|
Reply By:
|
milledj
|
Reply Date:
|
12/11/2006 2:16:00 PM
|
As a DBA, I might also suggest using a procedure like an API that deletes the data-- that way you can code in some intellegence into the delete on the database side.
Just a thought.
The previous example would also work, of course. But you might have to check for dependant relationships (parent/child) etc that might cause errors.
|