How do you delete a field?

How do you delete a field using ADO from an MSHFlexGrid
Takamine334Asked:
Who is Participating?
 
SethiCommented:
Lets say the user clicks a row in the grid. Generally when we fill the grid we set the first column's width as 0 and fill that columns with the primary key. Now when the user clicks the row, fill a variable with the value of the first columns data and on press of delete button use this value.

Dim intPrimary as Integer

On GridClick:
intPrimary=Cint(Grid.textMatrix(Grid.row,0))

On Delete Click:
strSQL="Delete from MyTable Where MyPrimaryKey=" & intPrimary
cnConnection.execute strSQL
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you mean, set it to NULL?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.