dmanick
16th November 2006, 05:11
Hello,
I am currently working on BaaN IVc4 under windows NT environment and writing an update session which reads input file containing two fields, item code and purchase price in the delimited format. And also I am accepting the input file name from the user using the form field. The external form field accepts the value like "d:\baan\admintmp\pur_price.txt". The declared form field in the program script showing the field value as "d:\\baan\\admintmp\\pur_price.txt". It shows 2 backward slashes for each backward slashes. I worked all the time in the unix environment and used to use forward slashes. This the first time I am working on NT and MS SQL database. Can anyone please help me how to avoid duplicating the back slashes so that I can able to read the input file?
Thanks
dmanick
11/15/2006
mr_suleyman
16th November 2006, 08:23
It is very strange. I think that there is a problem in your logic but if user every time put files under the admintmp then you can determine it shared folder on NT. Then you only use field on the form to get file name from user.
Then in your program construct your path for NT like mine ( think that filetmp is shared folder)
filepath = "\\server01\filetmp\" & userfilename
I hope it may help you !
Good luck !
suhas-mahajan
16th November 2006, 09:00
Don't know, why your system behaving like this, I have done it many times without problem.
May be it is domain related problem, try changing it or try removing slashes by programming.
Also try something like in your script:
${HOME}/admintmp/pur_price.txt
All the best.
regards,
-Suhas
mark_h
16th November 2006, 16:12
The UNIX box I work on does the same thing with client side files. This does not prevent me from opening and uploading the client file. What kind of error are you getting when trying to read the file?
dmanick
16th November 2006, 17:51
Hello,
Even I tried to hard coding in the program like the following
asci.f = "d:\baan\admintmp\pur_price.txt"
where asci.f is the variable declared in the programming. Still it shows like
d:\\baan\\admintmp\\pur_price.txt. When I open the file it gives error return code -2. But, if I use forward slash it is not duplicating.
dmanick
10/16/2006
mark_h
16th November 2006, 18:57
How are you trying to open the file seq.open.local or seq.open? Seq.open should be used for a file relative to the server and seq.open.local is for a file with a path relative to the client.
mr_suleyman
17th November 2006, 11:30
It's very very strange problem I have never heard before. Did you ask it for your SSA-partner ?
toolswizard
17th November 2006, 14:45
Because ASCII strings can have control characters like \n for new line, when you want to actually use a \ it requires a second \ to tell the system that you really want to use a \.
I don't think your problem is the \, but that there is either a misspelled directory, permisssions in one of the directories, or file that does not exist. For quite some time the porting set will convert the \ properly for you if you want to use a / instead. Sometime just the initial D:/ has to be used then the rest can be \\.
Please update your post with your results for the next person that has the problem.
dmanick
18th November 2006, 22:16
Hello,
Thank you very much for all for your valuable input to resolve the issue. The problem is resolved on Friday. So, I am updating and it may be useful for others if they have the similar kind of problem. Per the input from you all, I analyzed my code and removed the drive d:\ and used like this "\\baan\tmp\pur_price.txt" and it worked fine eventhough it was duplicating the backflush.
Thanks,
dmanick
11/18/2006
m2_wnt
20th November 2006, 06:14
Sorry. Wrong posting.