Advertisement

02.14.2008 at 09:42AM PST, ID: 23163707
[x]
Attachment Details

Pick value from one table and insert it into another table using

Asked by megnin in .NET, MS SQL Server, Microsoft Visual Basic.Net

Tags: ASP.Net 2.0, VB 2005, Visual Studio 2008, SQL Server 2000

I have two tables in a SQL Server 2000 database; Worksites and Monitors.
I want to 'assign' a Monitor to one or more Worksites.

With table Worksites having columns keyWorksiteID, keyMonitorID and txtWorksiteName.  (keyWorksiteID being the Primary or Identity Key)
And table Monitors having columns keyMonitorID, LastName and FirstName. (keyMonitorID is PK)

Using either a GridView in an ASP.Net 2.0 web form or a DataGridView in a windows form, how could I allow a user to select a Worksite from the list of worksites then select a Monitor from the list of monitors and assign that monitor to the selected worksite, then assign the same monitor to additional worksites until some criteria is satisfied?

In basic terms:  Pick Worksite from gridview; pick Monitor from another girdview; put keyMonitorID from Monitor table into keyMonitorID of Worksite table; repeat.

Thank you for helping a beginner.

P.S. I'm going to be doing some things like counting the number of Applicants from a third table who are already assigned to each Worksite table so that each Monitor is only assigned to the number of Worksites with a total of, say, 30 Applicants.  So, would it be better to make this application a web app or a Windows app?
Thanks.

Start Free Trial
[+][-]02.15.2008 at 12:33AM PST, ID: 20900140

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02.15.2008 at 11:11AM PST, ID: 20904918

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 10:08PM PST, ID: 20917905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.20.2008 at 05:37AM PST, ID: 20937593

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, MS SQL Server, Microsoft Visual Basic.Net
Tags: ASP.Net 2.0, VB 2005, Visual Studio 2008, SQL Server 2000
Sign Up Now!
Solution Provided By: megnin
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628