Also, even though you have said you have double and triple checked the data, open the table and write down the data value, then set the field to null and reenter the data manually. This would insure that there are no unprintable chars preceding the value. I have not been able to duplicate your problem, so I am suspicious of the data.

Also, how is the data value added to the table to begin with?




----- 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


Reply via email to