Well for now, I would add TRIM to your expression.
set var vEdiFile = ( 'G :\ Edisoft \Sales\HOME DEPOT WESTCOAST \ recv \' +
(TRIM(.vEdiFile)) )
A question though. Did you cut and paste your expression from code into the
email. If you did, the dotted variable "vEdiFile" has a space between the
dot and "vEdiFile".
----- Original Message -----
From: <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Thursday, May 14, 2009 10:21 AM
Subject: [RBASE-L] - Fetch cursor
I am writing an app which involves a Declare / Fetch / While routine.
It works, however with the following unexpected result. The command:
FETCH c100 INTO vedifile INDICATOR ivvar1
WHILE SQLCODE <> 100 THEN
--Add path to file name
set var vEdiFile = ( 'G :\ Edisoft \Sales\HOME DEPOT WESTCOAST \ recv \' + .
vEdiFile )
The above fetch adds a space in front of the value that is fetched into
vedifile .
During trace I watch the variable vEdiFile and it displays a space as the
first character after fetched.
I can use the "Modify variable value" tool and confirm that the variable has
a space as the first character.
I have double and tripled checked that the data in the table does not have a
space in front of it.
The proceeding command to add the path then creates an invalid file name
because of
the added space. I have double and tripled checked that the data in the
table does not have a
space in front of it. Setting a variable to the column in the table at the
R> returns a value
with no space.
I have used Cursors on tables many, many times and have never seen this
before! I am at a loss
to figure it out. All variables are predefined before the While statement.
Has any one seen this happen or have any ideas what I might be missing?
Version V8.
Thanks,
-Bob