Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 4 Jahren, 8 Monaten
Letzter Beitrag:
vor 4 Jahren, 8 Monaten
Beteiligte Autoren:
Fabrice Harari, Ericus

[WB17] Automatic Creation of Files - Again

Startbeitrag von Ericus am 14.08.2013 12:32

Hi

I am still struggling with the automatic creation of files on the web server, that has just stopped after working 100% for nearly 2 years.

I have now made so many changes in my setup that I don't know anymore whether I am Arthur or Martha.

In my Analysis Description:

Analysis Directory = C:\My Sites\PlumAccounting\PlumAccounting.ana\

Default directory of the data files =

In the Setup Wizard the Analysis points to C:\My Sites\PlumAccounting\PlumAccounting.wdd

Default setup directory of the data = \plumaccounting

In Project Description:

Analysis Description

C:\My Sites\PlumAccounting\PlumAccounting.ana\\PlumAccounting.wda

Automatically create the data files when they are opened is ON

What role does the .RES file play if any. Is it needed on the server? The reason is the server does not seem to know about the new file I created in the Analysis.

As soon as the application perform a HreadFirst on the new table it bombs out with 'object not found'

On the local machine everything is working 100%.

I have tried repairing analysis, recompiling, repairing project etc. etc. 3 Days lost so far

Any suggestion most welcome.


Ericus Steyn

Antworten:

Hi Ericus

If I understand corectly, you are relying on "default" places for your files, which I never do....

I would suggest that you use my methods, which I"ve never seen failed:

In the project init code, you read an ini file in which you write the files directory
Then you do a hChangeDir for you files based on that directory
Then you can do your hcreationifnotfound (or not, if the automatic creation at first use option ischecked in the analysis for this file)

So the only difference between your test environment and the development environment is the content of the ini file and NO automatic mechanism is there to break out on you.

Now, The RES file is filled automatically when the files are created but its content are never automatically purged. So if for any reason it contains a wrong path (and it can contain several paths for each files), you may be in the kind of troubles you are seeing now.
The RES file is used by all automatic tools (automatic schema update by exampl)e to find the files to process... So it may be a good idea to purge it manually (there is a utility for that in the tools menu)

Best regards

von Fabrice Harari - am 14.08.2013 13:32
Hi Fabrice

I think we are on the same page here. I use something similar to this:

HChangeDir("*",fDataDir + ["\"] + "PlumAccounting_"+DataDirectory)

and that works fine for all the existing files. The correct files are opened.

However the new file in the analysis causes execution to stop regardless of whether I use HReadFirst or HCreationifnotfound

So the question is when HCreationifnotfound is used, where does Webdev go to see (1) if the file exists in the analysis and (2) what does the file look like so it is created exactly as it should be because I think that is where the problem is and why the 'object does not exist' occurs.

regards


Ericus

von Ericus - am 14.08.2013 13:57
Hi Ericus

In my experience, both in windev and webdev, after a hChangedir, the hcreation creates the file in the directory pointed by the hchangedir...

Of course, that is true ONBLY if the user has the necessary rights to create a file in the directory in question, which in webdev MAY be a problem. The "webdev user" is IUSER (or equivalent) and this is generally a user with very limited rights

You could transfer an empty file from your dev machine to see if reading/writing works with it... That would means that only the creation is blocked, and that would perhaps be solved by rights management

Best regards

von Fabrice Harari - am 14.08.2013 14:17
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.