crystalized
Programmer
I have a stored procedure here it is:
Now what I have been doing with stored procedures so far is using them in recordset objects using visual interdev. Now how it handles the underlying stuff I am not sure, but I am able to add records and update records etc with these recordsets.
This is the first stored procedure I have had where I have had to utilize two tables. Now the employee table is required to get the names only (I do not want to update or create any records in that table). I only want the ProjInternalTeam table to be updateable. Currently I recieve and error because it is trying to insert a record into the employee table (required fields are not provided).
I have seen a few things in the books online that make me think a cursor might be required (but I admit I know very little of cursors and so have been avoiding them). So before I leap to trying to learn cursors I was wondering if anyone has any suggestions as to whether it is possible to just make changes to my current procedure to correct the problem.
Thanks in advance for your help
Code:
Alter Procedure stpProjInternalTeam
(
@nFirmID int,
@nProjID int
)
As
Select pitProjID,pitFirmID,pitID,pitTask,pitEmpID,femFullName as nameOf
from tblProjInternalTeam,tblEmployee
where pitFirmID = @nFirmID and
pitProjID = @nProjID and
femID=pitEmpID and
femFirmID=pitFirmID
/* set nocount on */
return
Now what I have been doing with stored procedures so far is using them in recordset objects using visual interdev. Now how it handles the underlying stuff I am not sure, but I am able to add records and update records etc with these recordsets.
This is the first stored procedure I have had where I have had to utilize two tables. Now the employee table is required to get the names only (I do not want to update or create any records in that table). I only want the ProjInternalTeam table to be updateable. Currently I recieve and error because it is trying to insert a record into the employee table (required fields are not provided).
I have seen a few things in the books online that make me think a cursor might be required (but I admit I know very little of cursors and so have been avoiding them). So before I leap to trying to learn cursors I was wondering if anyone has any suggestions as to whether it is possible to just make changes to my current procedure to correct the problem.
Thanks in advance for your help