Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: MSSQL Express 2017 Default Values missing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Location
    Minneapolis, MN
    Posts
    185

    Default MSSQL Express 2017 Default Values missing

    I have recently upgraded my main office server. In the process we also upgraded from SQL Express 2008 to SQL Express 2017.

    Everything seem to have worked just fine, until the other day when I went to apply my changes from Development to Production environment.

    After making a change to the table, I received an error message that the table cannot save an empty value in a required field.
    When I opened DBBuilder, I noticed, that all values in the "Default" column are empty.... On ALL Tables. see picture
    Click image for larger version. 

Name:	Database Builder 18.2 - Missing Default values.png 
Views:	45 
Size:	56.9 KB 
ID:	13327

    What would one do to restore the default values?

    PS: My Development DB is SQL Express 2017 having the default values.

  2. #2
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    2,551

    Default Re: MSSQL Express 2017 Default Values missing

    This has been reported a few times.
    Was able to find this thread at least
    https://support.dataaccess.com/Forum...Default+values
    Samuel Pizarro

  3. #3
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    4,121

    Default Re: MSSQL Express 2017 Default Values missing

    thats a long standing bug in DF with CCH files

    something gets messed up and when you open the table in DBBLDR the defaults are gone. if you notice you can just delete the CCH file reopen the table and all is fine

    if you dont notice and you start editing the table it will loose all the defaults

    we have sent several examples to DAW but nothing ever happened. issue is still there. Not sure what triggers it

    best bet is to disable use of CCH files

    Only way to restore is to manually add them back
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  4. #4
    Join Date
    Sep 2011
    Location
    Minneapolis, MN
    Posts
    185

    Default Re: MSSQL Express 2017 Default Values missing

    Mike,
    as far as I understand, CCH files cache the table structure decreasing connection times.

    Would this slow down the connection to the DB?

    How would you disable use of CCH files?

  5. #5
    Join Date
    Jan 2009
    Location
    Richmond, VA
    Posts
    5,118

    Default Re: MSSQL Express 2017 Default Values missing

    I think the first step I would take is to erase the .cch files on the system and then have them recreated to see if the default values return (as mentioned in the other thread).
    Best regards,

    -SWM-

  6. #6
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    4,121

    Default Re: MSSQL Express 2017 Default Values missing

    Stephen

    this works as long as you dont start modifying them in dbbuilder. Once you modify the missing defaults are then written to the SQL table and remove them forever
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  7. #7
    Join Date
    Sep 2011
    Location
    Minneapolis, MN
    Posts
    185

    Default Re: MSSQL Express 2017 Default Values missing

    I will do that.

    I have just looked at the other Thread referenced by Samuel and found my CCH files have mismatching creation dates to the INT files. In my case, ALL CCH files have been saved and edited on the same date.

    Going through my notes, I find no indication I performed any updates in my live environment at the time. Did not delete the CCH files on that day either.
    Also, no emails/complaints from employees on server issues or application issues that day.

  8. #8
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    4,121

    Default Re: MSSQL Express 2017 Default Values missing

    I was worried about the speed penalty but it doesnt seem to be too bad.

    One of my customers has been running without them now for a while and has no issues.

    problem is when the defaults get lost you cant create any new records until you fix the defaults. Not fun.

    there is a setting in MSSQLDRV.INI to turn them off
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  9. #9
    Join Date
    Sep 2011
    Location
    Minneapolis, MN
    Posts
    185

    Default Re: MSSQL Express 2017 Default Values missing

    Thanks, I will check this out, maybe after trying to restore by deleting CCH files first.
    I have already edited two tables, and had to manually add new defaults to get them running again.

  10. #10
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    6,583

    Default Re: MSSQL Express 2017 Default Values missing

    If you have the defaults in your Dev workstation, you can use MSSQL Management Studio to "Generate Scripts" this will allow you to generate a sql script to re-build the DB. If you open that script. and copy ot all the "alter Table Set Default" statements into a separate SQL file you can run that new script against the busted databases and put all your defaults back.

    MM
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

Posting Permissions

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