Avatar of Tarxmees
Tarxmees
 asked on

PowerBuilder 10.5 cannot read file from fileserver

My PB application cannot read a file from fileserver although all mappings are correct and user permissions are granted. The of_dirlist() function under pfc_n_cst_filesrvunicode does find files in a specific directory on server using winapi FindFirstFileW, but somehow cannot read them. Upon debugging, I found that the file attributes ( argument to function pfc_n_cst_filesrvunicode.of_includefile()) has a value of 10272, which makes this file not acceptable. If I put the file into my computer and map the drive, then this value is 32 and file will be read successfully.
I wonder if someone knows which file attribute is wrong? Or is this something in server settings?
Editors IDEsSystem Programming

Avatar of undefined
Last Comment
Tarxmees

8/22/2022 - Mon
sandeep_patel

Hi,

I don't have pfc files to test this. But as you said......"Upon debugging, I found that the file attributes ( argument to function pfc_n_cst_filesrvunicode.of_includefile()) has a value of 10272, which makes this file not acceptable. "

Can you paste here code from of_includefile function? and what the arguments to this functions and value of those arguments?

Regards,
Sandeep
sandeep_patel

if possible also put your code which is trying to read the file.
sandeep_patel

well, I got the code. Basically you need to check how you are passing al_FileType=10272 to of_dirlist function? which in turn passed to of_IncludeFile().

And if you notice code of of_includefile, because of this value it didn't pass any if condition and hence returns False.

I think your calculation to list files and file specification is wrong. see pb help of DirList for values of different filetypes.

Regards,
Sandeep
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
Tarxmees

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.