hello all
i'm working with project VB6-SQL Server 2000
i have on Database Two Tables for Employers
Table 1
employer
Table2
Perm
Table 1> for Employer data Fields -> E_ID,Phone,Email,Usrnm,Pass,....etc
Table 2> for Permission Fields -> E_ID,Usr_Del,Usr_Edit,Sale_man,.....etc
and Table 1 have Primary Key "E_id"
i create relation 1 to 1 from employer.E_id to Perms.E_id
the E_id in both tables is same (auto Identity (1,1))
i want when i send Command to insert new Employer to the two tables in one sql command as th field E_ID is will give auto number and i want the same number in two tables for same employers
so i can then select employer information and Permissions and can edit/delete him-her
Note:the one emplyer will just have one id and one record
so what is the SQl Command that can make that ??


Reply With Quote


