Results 1 to 4 of 4

Thread: File Definition Problem - How to rebuild entire database - Help!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Feb 2009
    Location
    Temple, Texas
    Posts
    300

    Default Re: File Definition Problem - How to rebuild entire database - Help!

    I rebuilt it, I removed the 2 misnamed fields, I made a new one with a new name, redid all the code to use this new file, checked int, fd, tag, def files, none of it solved the problem. It turned out to be create code in the data definition and it's all working properly right now. There was an update to the person file from the address that was causing all this and DD_Lock_on_all was on. I did learn how to use BCP, created sql scripts to recreate new databases, creating bak files and restoring to new names. In short, I have become extremely competent with SQL, more than a Dataflex programmer should ever have to be, and have made just about every mistake you can think of and found out how to fix them. Moving a database from one server to another, upgrading everything, 2003 to 2012 server, 2008 to 2012 server, IIS, Mertech, DF, and DR as well as new code. There's no confidence in anything that used to be working because all of it is new. Makes it hard to know what to look for. It's not for the feint of heart. It would have been nice if it had all just failed immediately as it should have. Sometimes it saved, and intermittently, after a period of time, sometimes hours, the data was reversed and reverted. Because it was reverting, I thought it was SQL the whole time or some kind of file definition issue which there actually was which wasted even more time and pointing me in the wrong direction. To make things even more complicated, if the file was made to be just a Dataflex file, i.e. the only table not a SQL table, it worked every single time, again making me think it must be SQL. This code had been tested and worked but it was new code, though several months old and not tested thoroughly in a live environment. It was in test and never crashed, hence it looked like it was working fine so I wasn't looking at that code. The reverting did not happen until the server or the app was restarted and it was selective what data it reverted. The crashes were occurring because the address record was not quite written to the sql file (in some cases of course, it was selective) when someone tried to print a form that used the address file. The report hung and hung the entire app, ODBC couldn't see the data. Since the report accesses the data direct through ODBC, it's looking at the data in a different way. The data was there in the app and there in the browser though. So since it crashed, I had to restart the app and boom, there goes the data, gone, but selective. For some people, worked fine. The code in question updated all the person records that did not have an attached address in a loop and apparently sometimes left the person record on a person that didn't belong to that company once in a while. That's an illegal condition for the rules and relationships imposed. At least I'm presuming that was what the data definition was thinking. This is not my first hassle with data definitions. On a lark, I removed the update code to the person file, and that was it. I hope that someday this post helps someone look in the right place that comes across a problem like this. I did not think the data definitions could cause data to revert like this sometimes hours later after a save. Not in the least.

    By the way, to answer your point about editing off line, the browser would crash, again, sometimes. Certain records, but usually during testing with a brand new record. Sometimes I could fix the address record off line, records that eventually saved and became permanent. But mostly, I couldn't change it at all until it reverted back to the original data. in other words, I made a change, look in the browser, there's the changes, try and edit them, crashed the browser. Restart the app, data changes gone, it's reverted, now you can edit it.
    Last edited by salesnav; 15-May-2018 at 07:56 AM.

Tags for this Thread

Posting Permissions

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