Tilted Forum Project - TFP - Sexuality, Philosophy and Political Discussion

Go Back   Tilted Forum Project - TFP - Sexuality, Philosophy and Political Discussion > Interests > Tilted Technology

Reply
 
LinkBack Thread Tools
Old 05-21-2004, 03:48 AM   #1 (permalink)
Addict
 
Join Date: Apr 2003
Location: Grey Britain
[Visual Basic 6.0] Binding Controls to DataFields

I have a database front end in which I'm experimenting with using properties, binding etc. instead of lots of longwinded code. I have textboxes and comboboxes bound to a data control, connecting to fields in a database (sorry if my terminology is a bit out here) This is working nicely except that editing any of the textboxes automatically changes the respective entry in the database, without me calling the update method.

By preference, it'd be set up so that when users edit a textbox, they have to click a button to update the database and otherwise it would just stay as it was.

Question is, can this be done while I'm still binding controls to the data control or do I have to do it by steam?
__________________
"No one was behaving from very Buddhist motives. Then, thought Pigsy, he was hardly a Buddha, nor was he a monkey. Presently, he was a pig spirit changed into a little girl pretending to be a little boy to be offered to a water monster. It was all very simple to a pig spirit."
John Henry is offline   Reply With Quote
Old 05-25-2004, 07:00 AM   #2 (permalink)
Psycho
 
Join Date: Apr 2003
You should be able to use the UpdateRecord method of the data control in your button click event.
__________________
We are not in the 8th dimension. We are over New Jersey.
wondash is offline   Reply With Quote
Old 05-26-2004, 05:54 AM   #3 (permalink)
Addict
 
Join Date: Apr 2003
Location: Grey Britain
That's how I set it up originally, but it was updating records without the button being pressed. I think there's some property to do with the binding that I have to change, but I can't get the right window open to do it.
__________________
"No one was behaving from very Buddhist motives. Then, thought Pigsy, he was hardly a Buddha, nor was he a monkey. Presently, he was a pig spirit changed into a little girl pretending to be a little boy to be offered to a water monster. It was all very simple to a pig spirit."
John Henry is offline   Reply With Quote
Old 05-28-2004, 07:21 AM   #4 (permalink)
Psycho
 
Join Date: Apr 2003
When do you think the update is occurring? Is it when your bound control loses focus? I created a simple test project with a textbox, button, and datacontrol. I linked the datacontrol to an access database and bound the textbox to a field in a test table. If I change the data in the textbox, the update will only occur when I change records (using the datacontrol), or execute the UpdateRecord method. Tabbing off the control does not cause an update.
__________________
We are not in the 8th dimension. We are over New Jersey.
wondash is offline   Reply With Quote
Reply

Bookmarks

Tags
basic, binding, controls, datafields, visual

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -7. The time now is 08:04 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
All text (c) 2002-2008 Tilted Forum Project
"Insignia" vBulletin 3.5 - b6gm6n - x7x7x7.com