david7777777777
Programmer
Merlin,
Question 1: I’d like to get your opinion on this matter as well. I just want to make sure I’m thinking about this in the correct manner. I have a SQL 2000 database and I’m using Visual InterDev 6 to make ASP pages for the front end. I’m now trying to figure out how to allow users to edit records using drop-down menus for certain fields in the records. These drop-down menus would be displaying items from another table. I’ll use an example to make things clear. I have two tables and I’ll list their columns:
Tbl_employees: ID, LastName, FirstName, Department
Tbl_departments: ID, Department
I want the users to be able to use a drop-down menu when selecting the appropriate department for an employee when editing their record. I’ve played around with doing the lookup with the drop-down menu linked to the department table and binding it to the department field in the employees table but I think I’m missing something, I know I am. When I tried to edit the department field for an employee record after I thought I had it set up correctly, I get a “1” in the department field instead of one of the departments listed in the department table. I’m also researching table joins to make sure I have my table broken down the way I should. Can you point out the must-have’s and must-not’s of this scenario regarding the correct DTC’s to use, their associated script, and what not in InterDev please?
Question 2: When I load the page that has the employee records displayed and ready for editing in a grid or something, how do I make sure that the drop-down menu (for the department) displays the current value of the record and doesn’t overwrite the current value for that record with oh say the first item (department) in the department table? I think I might have just answered my own question by typing this out this way, but I’d still like your opinion or clues. The next time you're in San Francisco lunch is on me.
Thank you.
Question 1: I’d like to get your opinion on this matter as well. I just want to make sure I’m thinking about this in the correct manner. I have a SQL 2000 database and I’m using Visual InterDev 6 to make ASP pages for the front end. I’m now trying to figure out how to allow users to edit records using drop-down menus for certain fields in the records. These drop-down menus would be displaying items from another table. I’ll use an example to make things clear. I have two tables and I’ll list their columns:
Tbl_employees: ID, LastName, FirstName, Department
Tbl_departments: ID, Department
I want the users to be able to use a drop-down menu when selecting the appropriate department for an employee when editing their record. I’ve played around with doing the lookup with the drop-down menu linked to the department table and binding it to the department field in the employees table but I think I’m missing something, I know I am. When I tried to edit the department field for an employee record after I thought I had it set up correctly, I get a “1” in the department field instead of one of the departments listed in the department table. I’m also researching table joins to make sure I have my table broken down the way I should. Can you point out the must-have’s and must-not’s of this scenario regarding the correct DTC’s to use, their associated script, and what not in InterDev please?
Question 2: When I load the page that has the employee records displayed and ready for editing in a grid or something, how do I make sure that the drop-down menu (for the department) displays the current value of the record and doesn’t overwrite the current value for that record with oh say the first item (department) in the department table? I think I might have just answered my own question by typing this out this way, but I’d still like your opinion or clues. The next time you're in San Francisco lunch is on me.
Thank you.