Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating multiple SQL tables from one ASP.Net form

Status
Not open for further replies.

david7777777777

Programmer
Sep 26, 2001
417
US
Please do not write my code for me, but snippets are ok. I prefer being led to the right resource where I can read and learn how to resolve my problems. Thank you very much for your assistance.

I'm using ASP.Net on Win2K Server and VS.Net for development. I'm trying to update several tables with a single transaction if this is at all possible. Here are my tables with sample data:


tblClients
ClientID Client
1 IBM
2 Cisco
3 Nabisco

tblEmployees
EmployeeID FirstName LastName
1 Bob Smith
2 Mary Smith
3 Mike Randolph
4 Zack Smith

tblClientTeams
ClientTeamID ClientID EmployeeID
1 1 2
2 1 4
3 2 1
4 2 2
5 2 3
6 3 1
7 3 3

Each client team can have one or more team members (employees). Each employee can participate on multiple teams.

I need to design an input web form page that will allow end users to input this client team data. They would be adding employees to the tblEmployees table, clients to the tblClients table, and adding client team relationship entries into the tblClientTeams table..... I think.

Where I'm stuck is trying to figure out how to provide a UI page that is somewhat dynamic, so the end users can enter one or multiple records based on their need. My question is this: How do I provide a dynamic way for the end user to select how many employee-client team membership entries they need to enter in one sitting, then build-up the data entry page with exactly that number of controls for them to use? Thanks.
 
david,

As a thought, why not have a dropdownlist for clients, a dropdownlist for employees and perhaps a listbox for relationships? This way, you could select which employee you would like to work with and then add or remove (from the listbox) which clients are associated with that employee? If you want to get fancy and make a nice GUI, you could perhaps not use a listbox and instead use a bound datagrid (binds to the tblClientTeams table).

Hope this makes sense, and hope it helps :)

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top