Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Red face Unanswered: unique table property

    hi all I have a stored procedure that I just wrote for the users, it allows them to be able to look up information and correct in a datasheet form. Now all the other look up forms I did this with dont have this problem just this on. When they try to edit they get a message saying "Form is read only because the unique table property is not set" I dont understand can anyone help pls. Is there something wrong with my code, the users have been entering data in these table for a while now, so I dont understand


    Code:
    ALTER PROCEDURE dbo.SrchStudentInformation
    
    
    
    @Enter_StudentFirstName nvarchar(50) 
    ,@Enter_StudentLastName Nvarchar(50) 
    ,@Enter_ParentID Nvarchar(50)
    ,@Enter_FamilyID nvarchar(50)
    
    
    
    AS
    
    IF @Enter_StudentFirstName = ''
    BEGIN 
       SET @Enter_StudentFirstName = NULL
    END
    
    IF @Enter_StudentLastName = ''
    BEGIN
    	SET @Enter_StudentLastName = NULL
    END
    
    IF @Enter_ParentID = ''
    BEGIN
    	SET @Enter_ParentID = NULL
    END
    
    IF @Enter_FamilyID = ''
    BEGIN
    	SET @Enter_FamilyID = NULL
    END
    
    SELECT     Student_ind.[Student First Name], Student_ind.[Student Last Name], Student_ind.[Student SS#], Student_ind.[Student Sex], 
                          Student_ind.[Student Date of Birth], School_tbl.[School Name], School_tbl.[School Phone], School_tbl.[School Address], School_tbl.[School City], 
                          School_tbl.[School State], School_tbl.[School Zip], School_tbl.Grade, Student_ind.[Family ID], Student_ind.[Parent ID]
    FROM         Student_ind LEFT OUTER JOIN
                          School_tbl ON Student_ind.[Student ID] = School_tbl.[Student ID]
         WHERE
    	   (@Enter_StudentFirstName IS NULL OR Student_ind.[Student First Name] = @Enter_StudentFirstName)
    AND (@Enter_StudentLastName IS NULL OR Student_ind.[Student Last Name] = @Enter_StudentLastName)
    AND	 (@Enter_ParentID IS NULL OR Student_ind.[Parent ID] = @Enter_ParentID)
    AND (@Enter_FamilyID is null or Student_ind.[Family ID] = @Enter_FamilyID)

  2. #2
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    All taken care of was a silly mistake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •