Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr
Letzter Beitrag:
vor 1 Jahr
Beteiligte Autoren:
Allard, Joris, Fabrice Harari

strage bug when changing connection

Startbeitrag von Allard am 30.05.2017 13:56


I have a SAAS app .
User logs in in main db

In main db his db's are listed. He chooses one and based on that I close the connection to the main db and open the client db.

Ok this goes fine but every now and then I get a strange bug:

If I want to add a client adres for instance

I fhave a client table called: "Klant"
And I have a client-adres table called : "Klantadres"

reading and mutating this Klant table goes just fine . But if I want to add something and odd error steps in :

Error returned by server:
Integrity error.
The "test\klanten.fic" path is not found in the wdsoft database.

WL call:
Process of 'Click of BTN_Oplsaan_klantadres ( POPUP_nieuw_klantadres ) (server)' (PAGE_klanten.POPUP_nieuw_klantadres.BTN_Oplsaan_klantadres), line 50, thread 0
'HAdd' function, syntax 1

What happened?
Error returned by server:
Integrity error.
The "test\klanten.fic" path is not found in the "wdsoft" database.

Error code: 74005
Level: fatal error
WD55 error code: 4005

Dump of the error of 'WDHFSRV64.DLL' module (
Identifier of detailed information (.err): 73261
Debugging information:
Fonction (7,0)
Additional Information:
EIT_IDCODE : 851984
EIT_SERVEURCS : localhost
Click of BTN_Oplsaan_klantadres ( POPUP_nieuw_klantadres ) (server) (PAGE_klanten.POPUP_nieuw_klantadres.BTN_Oplsaan_klantadres), line 50
EIT_DATEHEURE : 30/05/2017 15:30:21


Strange thing is that "Test"is the name of an other db

If Ichange something to the klant adres table and let the analysis be generated again then there is no eror all goes fine.

I have come to the conclusion that It must have something to do with deleting the old connection and opening the new connection.

My code to change connection:

// if there is a db to choose form in the table ad stuff to a variabele
IF HReadSeekFirst(Administratie,AdministratieID,TABLE_administraties.COL_ID) THEN
gstrDbUser = Administratie.dbuser
gstrDbPassword = Administratie.dbpaswoord
gstrDbDatabase = Administratie.dbdatabase
gstrDbDataSource = Administratie.dbServer

//Add variabeles

// Describe the connection
MyConnection..User = gstrDbUser
MyConnection..Password = gstrDbPassword
MyConnection..Server = gstrDbDataSource
MyConnection..Database = gstrDbDatabase
MyConnection..Provider = hAccessHFClientServer
MyConnection..Access = hOReadWrite
// open the new connection

IF NOT HChangeConnection("*",MyConnection) THEN


IF HReadSeekFirst(Boekjaar,BoekjaarID,werkjaar.BoekjaarID ) THEN
gnAdminjaar = Boekjaar.Jaar
RTA_Admin = "Administratie: "+ gstrDbDatabase +"( "+ Boekjaar.Jaar+ " )"

If I change something inthe analyse. Like adding a field or changing a field then this faults are gone and it works just fine. But after few days same fault )

Anyone an Idea what this might be





I doubt if it is a bug when changing connections...

Did you already check the integrity constraints in the hyperfile control center? Perhaps these constraints are pointing to files in different databases?



von Joris - am 30.05.2017 14:58
Hi ,

integrity constraints in the hyperfile control center??

where can I find that ?


von Allard - am 30.05.2017 17:01
Hi Joris

Yes indeed that is the case.

I havenot looked at this ever befor and I donnot know what this means??

what Am I to do with these. In my test db there are over 400 rules opointing to diverent db fiules and in other db's there are 150 and 160 rules.

what does this mean? I saw that the analyse uses one db when integrety rooles are changed. Does this mean that these modifications only go for 1 db?

CanI remove them all ?


von Allard - am 30.05.2017 21:04
Hi Allard,

When using HFCS, the constraints are managed by the database, not by your executable (like in classic HF). Because of this, in HFCS there is a directory with FIC files containing the integrity rules. They are added automatically when a modfic happens. Sometimes it can go wrong as you experienced. You can find different posts about this on the forum.

Kind regards,


von Joris - am 31.05.2017 10:34
Hi Joris,

Indeed. huh I found out that it is managed automatiicly. Can't do anything about it...
Hmm Maybe one more reason to go with mysql in a life scenario....

Thanks for the info . Ill try finding something on this forum.


von Allard - am 31.05.2017 12:38
I also had this problem in the past. Since a few years i disabled the usage of the .REP file and i have never had this again.

See for instance this post : http://27130.foren.mysnip.de/read.php?27131,592662,592838#msg-592838

Kind Regards,


von Joris - am 31.05.2017 13:28
Hi Allard,

this integrity constraints are NOT automatic. They are defined by YOU in the analysis, each time you define a link : you answer the questions about what to do when deleting/modifying a record...

If you are NOT using the functionality in question (cascading delete, by example), then you do NOT have to define them, and you can say that everything is authorized... You'll just have to manage these cases in your code, as you probably did for a very long time.

So no, it's not a reason to switch to mysql :-)

best regards

von Fabrice Harari - am 31.05.2017 14:58
Hi Fabrice,

Indeed you are right. I used to define the db tables in hyperfile classic. If so then not all the links are added to the different datbases that one opens by programming.

However If one changes this initial connection to hyperfile CS then it is all done by webdev
links are done right.
Did that and it works fine. ( it evenstates so in the screen if you do a synchronisation in the analyses section !. did not read that at first)

Indeed I thought deleting woyld not matter since I check everything in code as well. (But links matter when you do queries It gives the querie generator some clue on what you want !!)

Thanks for the response .

von Allard - am 31.05.2017 15:21
Hi Allard,

you should read my answer again.

I NEVER said that you should not use link. I just said that you CAN not use the CONSTRAINTs part of the link setting (ie let the deletion and modification free) while STILL having the links usable for the queries

Best regards

von Fabrice Harari - am 31.05.2017 16:23
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.