How do you delete a field?

How do you delete a field using ADO from an MSHFlexGrid
Who is Participating?
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:

On Delete Click:
strSQL="Delete from MyTable Where MyPrimaryKey=" & intPrimary
cnConnection.execute strSQL
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you mean, set it to NULL?
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.