Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
16
Erster Beitrag:
vor 8 Jahren, 6 Monaten
Letzter Beitrag:
vor 8 Jahren, 6 Monaten
Beteiligte Autoren:
Louis Verbraak, Jimbo, Arie, Aad Gouka, Stefan Bentvelsen

[WD12] WDModFic and CS

Startbeitrag von Louis Verbraak am 10.06.2009 12:08

Hello to you all,

I use WDModFic to change the structue of my files. This works well in HF Classic mode, but I can't get it working in HF C/S. In my database I've subfolders for each administration and I want to change the structure of the files of one administration at a time. I use the following statement:

lsConversie=""C:\WinDev 12\Programs\WDModfic.exe" /WDD="D:\Vemasoft\Exe\Vemasoft.WDD" /SERVER=Administrator:vemasofthfcs@Server01:4900/Vemasoft /apply"
lbGeopend=ExeRun(lsConversie,exeActive,exeWait)

lbGeopend returns TRUE, but when I look at my files nothing has changed!
I've tried to use the parameter /DIR=".\adm0001", but that didn't work either.

Can anybody tell me what I'm doing wrong?

Antworten:

Hello Louis,

This is the way I did it and it's working fine with the only difference -subdir parameter. In my case WDModfic is changing all the subdirs as well.

Maybe you can compare my version against yours.


IF gbClientServer = 0
ExeRun("wdmodfic.exe -subdir -report -nobackup /US /WDD="+fCurrentDir + "\Winvve.WDD /DIR="+DriveIni+"\winvve",exeMaximize,exeWait)
ELSE
ExeRun("wdmodfic.exe -subdir -report -nobackup /US /WDD="+fCurrentDir + "\Winvve.WDD /SERVER=Admin:@"+gsServer+"/winvve",exeMaximize,exeWait)
END



Good luck.

Regards,

Aad

von Aad Gouka - am 10.06.2009 13:36
Hello Aad,

Thanks for your suggestion. Because of the -report-parameter I get an answer which I didn't expect: 'No files to modify'! I'm quite sure there must be a differrence between my files and the analysis.

Perhaps you can tell me where I make a thinking mistake ('denkfout' for the dutch). I wonder where the original analysis of the created files is written. Because when I import the files in CS, I need to give the analysis-file. Is this file imported in the CS or isn't it nessecary anymore? In my programdirectory there still is the (new) wdd-file.

Thanks in advance.

von Louis Verbraak - am 10.06.2009 14:16
Hello,

I changed my code so the wizard automatically started (-wizard-parameter). Then the wizard indeed started and by default he didn't see the files of my database to change. In the wizard I manually connected to my database and then he saw the changed files.

Perhaps this can give anyone a clue to an answer?

Thanks again.

von Louis Verbraak - am 10.06.2009 14:40
Hi Louis,

I use the .wdd from the projectdir and copy it to the programmap of my application. I also copy WDModfic into the programmap of the users computer. As you can see I don't use any paths other then the fCurrentdir.

Did you change the standard Admin password in Administrator ??


Rgrds, Aad



von Aad Gouka - am 10.06.2009 15:47
Hello Add,

I do the same concerning the wdd-file and yes I've changed the name of the admin.
I can't get it right by automatic modification, only when I use the wizard?!

von Louis Verbraak - am 10.06.2009 16:05
Louis,
what does /apply do?
I don't see it in the help.
I'm using wdmodfic from within my software without any problems. Like you do, using commandline parameters and/or via the wizard (whatever the user wants).
BTW: I'm using HFCS, but NO subdir.

IF bAuto THEN
// Full name of the WDD with its path (here, in the same directory)
FullWddName is string = CompleteDir(fExeDir())+"Easy4U.wdd"
IF NOT fFileExist(FullWddName) THEN
FullWddName = fSelect("", FullWddName, "Select analysis", "Analysis"+TAB+"*.wdd", "wdd", fselOpen+fselExist)
END

// No file selected
IF FullWddName = "" THEN
RETURN
END

sCommandLine = """" + WdModficExe + """" + " /US" + " /WDD=""" + FullWddName + """" + "/SERVER=" + sUser + sPassword + "@" + HFServerAddress +"/" + DatabaseName + " /REPORT /ERROR"
ELSE
sCommandLine = """" + WdModficExe + """" + " /US" + " /WIZARD"
END

Arie

von Arie - am 10.06.2009 18:58
Hello Arie,

I didn't see any difference in using /apply or not.

I got it from the help:

Quote
Using WDModFic for a Hyper File Client/Server database

// Parameters for the automatic file modification
// Directory containing WDModFic
WDModifDirectory is string = "C:\Program Files\WinDev 11\Programs\"
// Full name of the WDD with its path (here, in the same directory)
FullWddName is string = CompleteDir(fExeDir())+"MyAnalysis.wdd"
// User name and password on the Hyper File server
// (with rights for modifying the file structure)
User is string = "guest"
Password is string = ""
// IP address or DNS name of the machine that hosts the Hyper File server
AddressOrHFServerName is string = "MachineName"
// Port of the Hyper File server
HFServerPortNum is int = 4900
// Name of the database where
// the files to modify are located
DatabaseName is string = "MyAnalysis"
CommandLine is string
// Build the command line
// Remove /apply to not get
// a dialog box at the end
CommandLine = StringBuild([
"%1WDModFic.exe" /WDD="%2" /SERVER=%3:%4@%5:%6/%7 /apply

,CompleteDir(WDModifDirectory
FullWddName,User,...
Password,AddressOrHFServerName,...
HFServerPortNum,DatabaseName)

// For test purposes the command line can be displayed here
// in order to perform a visual check
// //Info(sCommandLine)
// Start the automatic modification while waiting for the end
IF NOT ExeRun(CommandLine,exeActive,exeWait) THEN
// Launch failure, display error
Error("Unable to run the automatic modification"+...
" data: ",ErrorInfo(),...
"Command line used: ",CommandLine)
ELSE
//Automatic modification performed
END]



von Louis Verbraak - am 10.06.2009 21:35
Hi Louis,

have you also copied the files 'WD120Util.wdk' end 'WDMod120.dll' to your programdirectory ?
At first, that was the problem in my case when I start to use WDModfic.exe from code in my program.


von Stefan Bentvelsen - am 11.06.2009 06:53
See Jimbo's post on the SaaS subject, regarding subdir and some other issues with wdmodfic and the rep-file.
http://forum.mysnip.de/read.php?27131,28866,28966#msg-28966


Arie

von Arie - am 11.06.2009 07:01
Hello Stefan,

Yes I have. Thanks.

von Louis Verbraak - am 11.06.2009 08:02
Hello Arie,

I've seen that post already and I don't use a REP-file. Thanks.

von Louis Verbraak - am 11.06.2009 08:04
Quote
Louis Verbraak
Hello Arie,

I've seen that post already and I don't use a REP-file. Thanks.

Kind regards,

Louis.


Hi Louis, I don't use a REP-files too since 2006 because of the described inconsistencies. Whenever there's time, I'll re-test the old problems and try to find out whether these problems still exist, new ones have been added, or, wonder of wonders, some of them were fixed in the meantime.

The SaaS-issue had been subdirectories to a single database. In 2006, I had to accept that it is impossible to use several subdirectories containing identical sets of datafiles corresponding to the same analysis - I rather had to switch to a separate database for each set of files.

Kind regards, Guenter

von Jimbo - am 11.06.2009 08:22
Hello Guenter,

For now I stay with my structure of subdirectories in one database. I'll try to find a workaround for the datamodification (I understood that Stefan copies the files to another directory) or block that routine for CS-users.

Is it possible to connect the CS-files in the Classic way (HChangeDir/HChangeName) while the server is running?

von Louis Verbraak - am 11.06.2009 09:02
Quote
Louis Verbraak
Hello Guenter,

For now I stay with my structure of subdirectories in one database. I'll try to find a workaround for the datamodification (I understood that Stefan copies the files to another directory) or block that routine for CS-users.

Is it possible to connect the CS-files in the Classic way (HChangeDir/HChangeName) while the server is running?

Kind regards,

Louis.


Hi Louis, I'd suspect that troubles are waiting in the background when choosing such an approach (rights, users). Moreover, on some servers (e.g. Windows 2005 / 2008 Small Business) you will not be able to do a ChangeDir(..) from a client computer. Connection only by LDAP or by IP. I'd recommend to HCopyFile(..) the files to a local directory and do a restructure there and copy the files back to the server. That has BIG disadvantages because WDMODFIC will 1 - add /change / remove sets of stored procedures 2 - will take care of the integrity.fic file in database subdirectory _system 3 - will add / change / remove links. You could do that by H-commands too .. but, just to add my 2 cents: don't repair a bad design by further adding possible future trouble. Drop the current subdir-design and invest into a clear multi-database design as I did.
Kind regards, Guenter


von Jimbo - am 11.06.2009 09:42
Hello Guenter,

Thanks for your help. In the mean time I've tried to use WDModFic with the classis-way and this returns errors because the files are in use. For now I block the automatic dataconversion.

For everybody who answered: THANKS for your time.

von Louis Verbraak - am 11.06.2009 09:52
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.