Welcome! Log In Create A New Profile

Advanced

WD12 HyperfileSQL and HcreationIfNotFound() - Urgent

Posted by BLS 
Hi,
I run into a problem with HcreationIfNotFound() and HyperfileSQL.

Problem is that only a few files are created ( 4 / 68 )

	IF OnTestMode() THEN  // todo ckeck commandline
	
		WHEN EXCEPTION IN
			HCreationIfNotFound( "*", hDelayedOpening )
		DO
			Error("Hyper File error: " + HErrorInfo( hErrServerInfo) )
			ExceptionEnable()
		ELSE
			Info("Files created")
		END
	END

I get : "Files created", in other words, No exeption is raised.

I have to add that I am accessing the database via VPN tunneling.
Many thanks in advance, Björn
Jimbo
Re: WD12 HyperfileSQL and HcreationIfNotFound() - Urgent
April 08, 2009 07:09PM
Hi Bjoern,

I'm doing the same thing in a slightly different way and that's working fine to remote databases:


	// Die Dateien Öffnen und ihre Struktur beobachten
	ErgebnisString = HListFile("","",hLstNormal)+CR
	FOR I = 1 TO StringCount(ErgebnisString,CR)
		MyFileName = ExtractString(ErgebnisString,I,CR)
			WHEN EXCEPTION IN
				HOpen(MyFileName)
			DO
				// Die Datei hat ein Problem
				IF HError() = 70021 OR HError() = 70052 THEN
					HIndex(MyFileName,hNdxSilent)
				END
				IF HError() = 70003 THEN 
					HCreation(MyFileName)
				END
				IF HError() <> 70021 AND HError() <> 70052 AND HError() <> 70003 THEN
					Info("Öffnen der Datei: "+MyFileName,"Fehler "+HError()+" aufgetreten !",HErrorInfo(hErrFullDetails))
				END
			END
	END

So, I'm treating each file of the analysis separately ..

Kind regards,
Guenter
Thanks Jimbo san,
I'll use your code, nice stuff smiling smiley

Yeah that was I weired problem with HchangeConnection(). Found the error, but your code is still nicer.

Beside there is a minor database related Bug. In case that you use a unicode string (within your database-table) the WD120UNI/ or WDUNI120.DLL is missed. Not a big deal. You have to copy this DLL into your HyperfileSQL directory.

Thanks, Björn
Jimbo san,
just re-read your code. That's damned cool stuff. smiling smiley Did you run any Tests on HFSQL /CS version 12 ?
Björn
Jimbo
Re: WD12 HyperfileSQL and HcreationIfNotFound() - Urgent
April 08, 2009 07:28PM

Hi Massa Bjoern,

this is working for HFSQL C/S v14 now but worked from v11 upwards.

Kind regards,
Guenter
Al
Re: WD12 HyperfileSQL and HcreationIfNotFound() - Urgent
April 09, 2009 05:23AM
Hello Björn

In V12, there is an auto creation if not found setting in the project setup under the files option. It would be interesting to see if it solved the issue for you.

Regards
Al
Jimbo
Re: WD12 HyperfileSQL and HcreationIfNotFound() - Urgent
April 09, 2009 06:41AM
Hi Bjoern,

just an important addition: W-Language has no mechanism to find out the last Generation number of a file from the Analysis, only from the file itself!! There are two generation numbers! One sits in the Analysis and one is in each HF data file.

Therefore, the program would balk at you with an error message if the structure in the analysis doesn't match the physical structure of the data file. BUT: there's virtually no way to know whether the program needs to be updated or the data file has to be restructured! Even worse, I found that data files not always contain the correct generation number but do work together with an analysis of a higher generation number as long as the physical structure fits the structure in the analysis!

My suggestions to PC Soft:

1 - introduce a new command which lets one retrieve the generation number of a file / all files from the analysis.

2 - pull the generation number of ALL data files up to the current generation number in the analysis irrespective of their restructuring in the course of a wdmodfic session.

As a workaround for the time being I can only think of a separate data file which contains the current program's version number only and lets you decide later about updating the program vs. restructuring the files and pulling the files up to the program's current revision level. Which means that you'd have to update (HModify / HCopy) that file on each *successful* restructure run of the files to the current version number. Which means that uncontrolled external uses of wdmodfic.exe by end-users would be a big no-no, even those possibly initiated by the install process of the program.

Version of running program > program version in data version file -> restructure data
Version of running program < program version in data version file -> update program

Kind regards,
Guenter




If your looking for votes you have mine. winking smiley

Björn
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: