C
Chris Gray
Some background: We are creating a form for our HR department that can be
filled upon hiring. This form will contain all the user information in a
single table, and a related table will hold all user information for the
applications that they will need. What I would like is for HR to be able to
click a "fill" button to fill the repeating table for the applications they
need. I only need it to populate the "Application" field as I have rules
that will fill the related fields. I have searched for books on this
subject, forum posts, etc and have found very limited information.
This is going to be a many-to-many relationship within SQL since I will have
many applications and multiple job positions that can be selected. I'd like
the "fill" button to add a row to the Application table for each application
necessary to that job position. I have figured out the relationship in sql,
and the query to perform is something like this:
Select Application From Applications
Where ID IN
(Select Position_Applications.ApplicationID from Position_Applications
Where PositionID IN (Select Position.ID from Position where Position =
'Proof'))
The SQL database consists of 5 tables: Employee Info, Application Access
needed, Applications, Positions, AppID=PositionID (to join the two pieces of
data to show which apps are applicable to each job position)
I know this will take code, but being a n00b at coding, I was hoping for
some help. I know it will take a looping XPathNodeIterator of some sort, but
google has only gotten me so far. What I can't figure out is how to write
the code to iterate the table by repeating the complex sql query.
Would this be a stored SQL procedure that is called using variables that are
set based on the Position selection? Should the SQL query be inside the
code? As you can see, I'm much better with SQL than Visual Basic...but I'm
trying to learn the visual basic coding.
Any help is greatly appreciated
filled upon hiring. This form will contain all the user information in a
single table, and a related table will hold all user information for the
applications that they will need. What I would like is for HR to be able to
click a "fill" button to fill the repeating table for the applications they
need. I only need it to populate the "Application" field as I have rules
that will fill the related fields. I have searched for books on this
subject, forum posts, etc and have found very limited information.
This is going to be a many-to-many relationship within SQL since I will have
many applications and multiple job positions that can be selected. I'd like
the "fill" button to add a row to the Application table for each application
necessary to that job position. I have figured out the relationship in sql,
and the query to perform is something like this:
Select Application From Applications
Where ID IN
(Select Position_Applications.ApplicationID from Position_Applications
Where PositionID IN (Select Position.ID from Position where Position =
'Proof'))
The SQL database consists of 5 tables: Employee Info, Application Access
needed, Applications, Positions, AppID=PositionID (to join the two pieces of
data to show which apps are applicable to each job position)
I know this will take code, but being a n00b at coding, I was hoping for
some help. I know it will take a looping XPathNodeIterator of some sort, but
google has only gotten me so far. What I can't figure out is how to write
the code to iterate the table by repeating the complex sql query.
Would this be a stored SQL procedure that is called using variables that are
set based on the Position selection? Should the SQL query be inside the
code? As you can see, I'm much better with SQL than Visual Basic...but I'm
trying to learn the visual basic coding.
Any help is greatly appreciated