Alternately, if you are using SQL Server as your database you can get your GUID from the server instead. In TSQL:
//Retrive your key ID on the bases of GUID
declare @ID as uniqueidentifier
SET @ID=NEWID()
insert into Sector(Sector,CID)
Values ('Diry7',@ID)
select SECTORID from sector where CID=@ID