none
UpdateCheck Problem , Its Bug Or I Have Mistake ? RRS feed

  • Question

  • Hi

    i have a table with this structure :

    CREATE TABLE [dbo].[w](
    [a] [int] IDENTITY(1,1) NOT NULL,
    [b] [int] NULL,
    [c] AS ([a]+[b]),
    [y] [int] NULL,
    [bb] [nchar](10) NULL,
    [aaaa] [timestamp] NULL,
    CONSTRAINT [PK_w] PRIMARY KEY CLUSTERED 
    (
    [a] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    in msdn you can read about updatecheck property : http://msdn.microsoft.com/en-us/library/system.data.linq.mapping.columnattribute.updatecheck.aspx

    a have one timestamp column and when you generate linqtosql class you must have only one updatecheck property but you can see some columns with updatecheck.never , what is method and law for updatecheck in linqtosql class ?

     

    regards

    Ali

     

    Monday, January 17, 2011 2:31 PM

All replies

  • Are the columns that have UpdateCheck.Never primary keys?  I know Linq doesn't support primary key updates.
    Monday, January 17, 2011 4:59 PM
  • Hi

     

    No Its Not Primarykey you can test with my table structure that shown in post #1

    Monday, January 17, 2011 8:18 PM
  • Hi Ali,

    Thanks for your post.

    You have read the UpdateCheck property from MSDN, I amn't very clear about your question? Would you please clarfiy it?

    Here is helpful link: http://msdn.microsoft.com/en-us/library/bb399373.aspx about

    Optimistic Concurrency Overview (LINQ to SQL)

    Have a nice day


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 18, 2011 7:57 AM
    Moderator
  • Hi

     

     

    Yes Its Clear When You Want to use linqtosql class i have one problem about when i must make updatechek.never property for a column , or other enum values of updatecheck , but now i can solve this problem some days later with help of god i will upload a custom linqtosql generator as same sqlmetal but with many good deferent features ..

    regards

    Ali

    Tuesday, January 18, 2011 6:29 PM