Specific Column

pruebens

Well-known member
Joined
Nov 21, 2002
Messages
71
How do I update a specific column to a specific value?

ie: I want to pass the word FALSE back to the database for a specific column

Thanks for helping out a n00b.
 
Do you mean which value represents FALSE? Its either going to be -1, 0 or 1. One of those three numbers will represent TRUE as well.

Try all three, see what happens. :)
 
No thats not what I meant (sorry).

I need to actually pass the word FALSE back to the database.
 
If its a text field then wouldnt it be as easy as putting in the text "FALSE"?

Or are you asking how to actually do it? IE: Whats the code to update a database column?
 
sorry Im not explaining this very well :(

Its actually not a Text control but just text.

And I need to do something like this:

database.table.column = "FALSE"

But Im such a n00b I cant figure out the code to do it.
 
Code:
strSQL = "UPDATE myTable SET myTable.myField = FALSE WHERE myTable.ID = 1"
Then create either a OleDbCommand object or a SqlCommand object, depending on your database type, associate it with a connection object and call ExecuteNonQuery().
 
Back
Top