pruebens Posted December 2, 2002 Posted December 2, 2002 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. Quote
wyrd Posted December 2, 2002 Posted December 2, 2002 Do you mean which value represents FALSE? It's either going to be -1, 0 or 1. One of those three numbers will represent TRUE as well. Try all three, see what happens. :) Quote Gamer extraordinaire. Programmer wannabe.
pruebens Posted December 2, 2002 Author Posted December 2, 2002 No that's not what I meant (sorry). I need to actually pass the word FALSE back to the database. Quote
Moderators Robby Posted December 2, 2002 Moderators Posted December 2, 2002 Is the fields' data type text (string) ? Quote Visit...Bassic Software
wyrd Posted December 2, 2002 Posted December 2, 2002 If it's a text field then wouldn't it be as easy as putting in the text "FALSE"? Or are you asking how to actually do it? IE: What's the code to update a database column? Quote Gamer extraordinaire. Programmer wannabe.
pruebens Posted December 2, 2002 Author Posted December 2, 2002 sorry I'm not explaining this very well :( It's actually not a Text control but just text. And I need to do something like this: database.table.column = "FALSE" But I'm such a n00b I can't figure out the code to do it. Quote
*Gurus* Derek Stone Posted December 2, 2002 *Gurus* Posted December 2, 2002 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(). Quote Posting Guidelines
pruebens Posted December 2, 2002 Author Posted December 2, 2002 That did it. Thanks....you are very wise O ADO master :) Quote
*Gurus* Derek Stone Posted December 2, 2002 *Gurus* Posted December 2, 2002 ADO.NET thank you very much! ;) Quote Posting Guidelines
pruebens Posted December 2, 2002 Author Posted December 2, 2002 Ah yes.......how silly of me /me bows to the wise one of ADO .NET Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.