1. Andreas Mykonios
  2. PowerBuilder
  3. Tuesday, 26 September 2017 07:24 AM UTC

Hi.

I've noticed that fileopen works a little bit different in native pb and .net assemblies (this has been tested in pb 12.5 and pb2017). Fileopen returns the file number assigned to filename we want to open.

If I use now fileopen in conjunction with fileclose within a loop, in pb native every fileopen will return for example value 1 (as before reopening the file I close it) if it's the first file to be opened.

But in .net assemblies the file number always increase! This can be a problem if someone wants to open (and close) more than 32768 files.

Has anyone an explanation for that?

May I consider this as a bug?

Andreas.

Accepted Answer
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Friday, 29 September 2017 08:24 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Andreas,

 

The fileopen function of PB2017 is the same as PB12.6. No change has been made on this function.

I suggest that you declare a variable to get the fileopen return value and reset the variable each time after you use fileclose.

Please verify is this can work around the issue.

 

If the problem still happens, we'd be appreciated if you could submit a bug with a reproducible test case in http://www.appeon.com/standardsupport

 

Regards,

Mark Lee

Comment
  1. Andreas Mykonios
  2. Friday, 29 September 2017 13:33 PM UTC
Hi Mark.



The problem is that fileopen seem's to be working differently in a .net assembly than in a native application. The problem is not related to the variable I use but to the value returned by fileopen!



I have an example and will submit a case.



Anyway, thanks.

  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.