Normal Topic Manage a database feature  is a  little confusing (Read 838 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Manage a database feature  is a  little confusing
Feb 2nd, 2004 at 3:52pm
Print Post Print Post  
Using Manage a database feature  is a  little confusing.

I translated a little QA database and then merged it into my application.
I added a few lines of programming and all worked well.

I then realized that the field element names did not conform to my self imposed naming convention of database Identifier + element Name. For example these were in my products database and element names were Id, Description , PartNum and I wanted them to be  ProdID, ProdDescription, ProdPartNum

So I used Sdesigner

Manage a database
Manage fields
Change field name
field name
new name
Add to batch
Run Batch

(besides the already known problem of the wrong word of field instead of element) I thought that the selection Change field name would change the element name.

After running my batch I modified the code to reflect the new field names.
I reconciled and tested
It would not work now

Upon further inspection I found that Change field name actually changed the Bound to not the element name

After using Sdesigner to change field names one at a time all worked fine again.

Am I misunderstanding or misusing this feature ?  ???

I thought I would share this to save others from making the same mistake I did.  Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Manage a database feature  is a  little confus
Reply #1 - Feb 2nd, 2004 at 4:01pm
Print Post Print Post  
Change Field Name changes the underlying field name in the database. This does not rename the Elements bound to that field.

To change the Element names, open your Form, and use the Property Editor to rename the desired Layout Elements.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Manage a database feature  is a  little confus
Reply #2 - Feb 2nd, 2004 at 4:06pm
Print Post Print Post  
Yes there are three different dimentions of an element namely,

Label
Element Name
BoundTo

BoundTo is the database fieldname. 

Bob, you are right, understanding this in the beginging will save a lot of troubles to many in the future.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Manage a database feature  is a  little confus
Reply #3 - Feb 2nd, 2004 at 4:15pm
Print Post Print Post  
Quote:
Change Field Name changes the underlying field name in the database. This does not rename the Elements bound to that field.


Thanks for clearing this up for me. Smiley

It is tough getting the new concepts into my thick head.

I always remember that the element name itself has nothing to do with the label and that if I use an element on one form I can bind it to the field on another but for some silly reason I keep thinking that the form I created the element on is the main form. (old habits die hard)

I will eventually always remember that a field element is only the mechanism to access the data from the form. Not the data itself.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: Manage a database feature  is a  little confus
Reply #4 - Feb 2nd, 2004 at 6:46pm
Print Post Print Post  
Quote:
I will eventually always remember that a field element is only the mechanism to access the data from the form. Not the data itself.

- I'd rather you said:
"I will eventually always remember that a layout element is only the mechanism to access the data from the field."

- After a long time of encouraging you to use "Layout elements" rather than fields on a form, you've hit the area where we are specifically talking about FIELD names!
  

Alec
Back to top
IP Logged