Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

billa1 (Programmer) (OP)
12 Dec 11 1:45
I have a checkbox in the datawindow, It can be checked and unchecked. The default value in the db is 0. When Its checked, the db value is updated to 1 and on uncheck uthe value is updated to 0 again.
However, I want to update the database only if it has value 0. If it is already 1, then I don't want to change it back to 0. So please tell me how can I do that?
Here is the code from my datawindow for the checkbox :
Here is the code for that:

column=(type=decimal(0)  update=yes updatewhereclause=yes name=ok dbname="table.ok"  values="1/0"  )
mbalent (Programmer)
13 Dec 11 7:31
You can check the status of the column for each row in the datawindow prior to updating it (see GetItemStaus / SetItemStatus in PB Help).  There you can apply your logic and set the column to NotModified! so a SQL update statement is not generated when the update occurs.


"Nature forges everything on the anvil of time"

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close