Hi every one . I'm beginner in VB . I want to delete a column in my DataBase(DB2) , and write this command for delete
Dim conn As DB2Connection = New DB2Connection("database=tut8;UID=;PWD=")
Dim myCommand As New DB2Command
Dim sql1 As String
sql1 = "delete from student where id = ('" & TextBox1.Text & "')"
myCommand.Connection = conn
myCommand.CommandText = sql1
my problem this when i want to delete this command, just delete last row that i enter with command insert
In looking at the documentation, it isn't clear if you are allowed to drop columns in DB2. If not, you'll need to create a new table without the offending column, populate the new table with data from the existing table, then kill the old table, and rename the new table with the old table name.
Last edited by loquin; 09-03-10 at 02:58.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert