Results 1 to 10 of 10

Thread: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

  1. #1

    Default Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Lets say in 20.0 I have a table with 1 column and I have an index with that column with nothing but default properties setup using MSSQL Driver ie:

    Table - Name: Table
    Column - Name: Id, Type: Int, Size: 10, Main Index: 1, DataFlex Type: Numeric
    Index - Index 1, Column: Id, Index Name: Table001

    In 20.0 if I try to change the data in the program or in the table viewer, the data will not change and sometimes crashes the studio.
    This happens with MSSQL databases with testing in 20.0 and not in web order in 20.0 with embedded or in 19.0 with MSSQL Driver.
    I can also run a update query in sms to update the data no problem.

    Is there a setting I need to set for the database or the table or is this how the tables will act going forward with dataflex 20.0?

    Jarred

  2. #2
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Jarred,

    Does not ring a bell to me. Could you create a test workspace to duplicate and create a HDE ticket with this information.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  3. #3

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Hey Vincent,

    If you create a record and/or edit an the record or existing record, the data will not change. Also trying to change the data in the table viewer sort of bugs out the studio.
    My environment is Windows 10 64 bit, Dataflex 20.0, MSSQL Server 19, MSSQL SMS 18

    Jarred
    Last edited by Jarred@TME; 29-Apr-2021 at 09:59 PM.

  4. #4
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,447

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    is this column marked as Key-Column in DD ? By default DD protects changes on key_columns.
    Samuel Pizarro

  5. #5

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Hey Samuel,

    Even if I remove the Foreign Field Options it doesn't allow me to edit the record in the program, table viewer, or database explore.
    The data just reverts back to the original when you try to save.
    This also only happens in 20.0, 19.0 works fine. In MSSQL SMS I can also run a update query to update the record, so I think its localized to Dataflex 20.0.

    Jarred

  6. #6
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,085

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Did you reset Protect Value (Key) - the last entry under Data Entry Options of the DD? That's the one that controls being able to change it.
    Garret

    Time for an oldie but goodie:

    "If it ain't broke, you're not trying." - Red Green

  7. #7

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Hey Garret,

    Code:
    Set Protect_Key_State to False
    Set Key_Field_State Field Table.Id to False
    This didn't fix it, even with this set I should be able to change the data in the table viewer

    Jarred

  8. #8
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Samuel,

    Good support but DD's aren't used in the Studio's table viewer or in Database Explorer.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  9. #9
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Jarred,

    I've created your HDE account so you can move the files over to there and remove them here.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  10. #10

    Default Re: Changing Index 1 / Key Field Data of a Table in 20.0 MSSQL

    Thank you Vincent!

Posting Permissions

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