Welcome! Log In Create A New Profile

Advanced

LDM out of sync with Hyper Files (Classic)

Posted by Frank Missel 
Frank Missel
LDM out of sync with Hyper Files (Classic)
March 25, 2008 02:06PM
I have been working on a data model for some time. I have noticed that when you leave the data model window or close the project that the the physical files are updated so that they correspond to the data model. However, they have now somehow come out of sync. There are files in the data model which doesn't exist physically. When I use WDMap to have a look at one of the files missing, it ask for the location of the files not being there, so there is something wrong.

I have tried to use Analysis --> Advanced Generation and .. Repair Analysis. Both functions complete without error messages, but the problem is not fixed. I have even tried moving all files in the ....\<Project Name>\Exe directory to see if this would trigger a regeneration -- still to no avail. The generation runs through, but the directory is empty. The data model on the other hand stil contain all info on files, fields, keys, links, etc. I can still add to it and modify, so all info needed to generate the Hyper Files must still be there.

The only thing special about the analysis, is that I started by taking a part of the model from an Access database. However, I specified that Hyper File Classic should be used and thus only to copy the datamodel from the Access base, so I don't see why that should make any difference. Also, the problem only came later.

Are there someway to ask for Windev to just recreate everything in the ...\Exe directory?


Best Regards,

Frank
Louis Verbraak
Re: LDM out of sync with Hyper Files (Classic)
March 25, 2008 02:16PM
Hello Frank,

See HCreationIfNotFound().

HTH,

Louis.
Frank Missel
Re: LDM out of sync with Hyper Files (Classic)
March 25, 2008 04:42PM
Hi Louis,

Thanks for the ref.

I have only started using WinDev, and so I am still getting familiar with the WLanguage. I was getting to complete and model and now wanted to play with the RAD and build some custom windows.

I looked in the help file for HCreationIfNotFound. It would seem to be a command that you would use in the application for getting the system established at the end user installation smiling smiley(i.e. creating the tables in the database of his choice for the application). I would not expect that I would have to write and execute code in order fix up things in the development tool. But perhaps that is now necessary to fix the .REP file which I can see contains only some of the files from model, so that is probably the cause of the unfixable out sync.

I was impressed with the way that the datamodel and database work nicely together in WinDev. But also surprised that they could go out of sync. I thought that such internal data would be transaction safe or that there at least would be a menu option to fix things fast if there was a problem. Do I really have to write code to do it?

Perhaps PC Soft should consider using something like the SQlite database (single file, powerful, fast and transaction safe database - www.sqlite.com) for all internal data and possibly also as an alternate choice for the stand alone application database. Thus there would not be all these files lying around in the file system with possiblity of deletions or other OS errors occuring.

Well, all in all I am still impressed with what I have seen so far in WinDev smiling smiley.


Best regards,

Frank
Frank Missel
Re: LDM out of sync with Hyper Files (Classic)
March 25, 2008 04:56PM
Oops,

SQLite database is from: www.sqlite.org
and not: www.sqlite.com.

It is an open source database.


Frank
Fabrice Harari
Re: LDM out of sync with Hyper Files (Classic)
March 25, 2008 06:03PM
Hi Frank...

hCreationIfNotFound has nothing to do with fixing things... It's there to create the physical files...

When you work in the analysis (data model) you design the files, and you can create them one by one by doing a right clic, 'Create the date file'... But that's it...

After that when you want to test, you have to create the files if you didn't do it while in the analysis...

The hcreationIfNotfound is therefore usefull in test mode (not in the windev editor) and in exe mode (and in fact, it would be very bad if it was to be used only when installing a customer, because we wouldn't have any way to test it)

Best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile Video Courses
Frank Missel
Re: LDM out of sync with Hyper Files (Classic)
March 25, 2008 06:43PM
Hi Fabrice,

Ah ok, that was what I was looking for!

It seemed that the files was created automatically earlier every time the analysis pane was closed, but in any case, now I can create the files as needed.

Sorry, if I ask about things which may seem somewhat obvious. There is a lot of to learn when starting up with a new development tool -- I'll get up to speed eventually.

I find that the online documentation while reasonably thourough when it comes to each statement, command, etc. is not quite as good when it comes to giving an overview.
It would be nice with a programming handbook with a good structure and index covering the relationship between the different modules, tools, commands and the overall development concepts in more detail. The tutorial is okay for a brief introduction to get started, the online documentation is like a reference manual. Perhaps you should strike a deal with PC Soft and write the programming handbook smiling smiley.

As for hCreationIfNotFound I gathered as much. What I meant was that it would be part of the application that would be run at the end user after installation of the application to establish the database (Hyper File or otherwise). Or is that wrong?
Of course you also need to be able to test that part of the application before deploying.


Best regards,

Frank
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: