|
-
Sep 23rd, 2014, 08:22 PM
#9
Re: Associate button index with record id in database
 Originally Posted by SamOscarBrown
Well, without looking at the project, "I" would create a new field in the table and call it something like 'buttonIndex' and when I inserted something into the table based upon the click event of the cmdbtn, I'd insert the index of the button right there. Then it will always be available, and at form load one could always sort the initial query by buttonIndex to put the correct caption on the correct cmdbtn.
Make sense?
There is already a field called "ID" in the database which holds the button index. The ID field is set as the primary key.
 Originally Posted by IkkeEnGij
What is SlotNr? I already have already set the primary key for the database.
 Originally Posted by DataMiser
I think that if the data is to be matched to a button index then adding the index of the button as an indexed field in the DB is the best way to go.
It doesn't matter if something is added, removed nor changed the index field will match the index of the control. Seems extremely simple to me.
Yes you could use the tag but why bother?
The way I understand it is each record is linked to a button so there should not even be a changing number of records, 1 record for each button, record index= button index no problem
So you are saying I need separate fields, one to hold the button index and one for the item number?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|