Welcome! Log In Create A New Profile

Advanced

[WD12] HFileExist and CS

Posted by Louis Verbraak 
Louis Verbraak
[WD12] HFileExist and CS
May 05, 2009 11:01AM
Hello to you all,

I want to use HFCS for my data. I've created a connection and all works fine. Only when I use HFileExist in the following situation I always gets FALSE and I'm sure the file exists in the specified directory. I set the fysical name and directory of the file and use HChangeConnection to connect it to the right database. I use this procedure:

// Bestandenmap aanpassen.
lbGeopend=HChangeDir({sBestandsnaam,indFile},sBestandenmap)
IF lbGeopend THEN
____// Bestandsnaam aanpassen.
____lbGeopend=HChangeName({sBestandsnaam,indFile},sBestandsnaam[[8 TO]])
END
IF lbGeopend THEN
____// Bestand verwijzen naar connection.
____//lbGeopend=HChangeConnection({sBestandsnaam,indFile},gpsConnection)
____lbGeopend=HChangeConnection(sBestandsnaam,gpsConnection)
____IF lbGeopend THEN
________// Bestaat het bestand.
________lsBestandsnaam=sBestandsnaam[[8 TO]]
________lsBestandsnaam=NoSpace(lsBestandsnaam)
________lsBestandsnaam+=".fic"
________lbGeopend=HFileExist(gpsConnection,lsBestandsnaam) << THIS GIVES FALSE!!!
____END
END

Can anybody tell me what I'm doing wrong?
Louis Verbraak
Re: [WD12] HFileExist and CS - Found it
May 05, 2009 11:11AM
Hello,

I should use HChangeConnection before the HChangeDir and HChangeName.

I cheered :hot: to early sad smiley

Anybody an idea?

I need to use the relative path to the files '.\xxxxxx'.



Edited 2 time(s). Last edit at 05/05/2009 01:47PM by Louis Verbraak.
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: