1. Andreas Mykonios
  2. PowerBuilder
  3. Tuesday, 26 September 2017

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.

Who is viewing this page
Accepted Answer
Mark Lee Accepted Answer Pending Moderation
0
Votes
Undo

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
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. Andreas Mykonios
  2. Friday, 29 September 2017
There are no comments made yet.
  1. Friday, 29 September 2017
  2. PowerBuilder
  3. # Permalink


There are replies in this question but you are not allowed to view the replies from this question.