string variable and string field 
Author Message
 string variable and string field

I got a problem when I assigned a string to a string field in a table. They
are supposed to be exactly the same thing, but when I checked them byte by
byte, they were not. The weird thing is they are the same immediately after
I assigned the string and put it to the record and they are not after I
finish the record update. Is there any different between the string variable
and string field in a table?My code is:
get(FT2,ft:IDKey)
if ~errorcode()
clear(ft:FTemplate)
ft:FTemplate = clip(TempFTemplate )
   put(FT)
   !here they are the same
end
get(FT2,ft:IDKey)
if ~errorcode()
!here they are not the same
end

Please help if you have any idea.
Thanks a lot.



Mon, 29 Nov 2004 04:37:24 GMT  
 string variable and string field
I got a problem when I assigned a string to a string field in a table. They
are supposed to be exactly the same thing, but when I checked them byte by
byte, they were not. The weird thing is they are the same immediately after
I assigned the string and put it to the record and they are not after I
finish the record update. Is there any different between the string variable
and string field in a table?My code is:
get(FT2,ft:IDKey)
if ~errorcode()
clear(ft:FTemplate)
ft:FTemplate = clip(TempFTemplate )
   put(FT)
   !here they are the same
end
get(FT2,ft:IDKey)
if ~errorcode()
!here they are not the same
end

Please help if you have any idea.
Thanks a lot.



Mon, 29 Nov 2004 04:37:08 GMT  
 string variable and string field
When you say "not the same", so you mean that they stored value has trailing
spaces?  If so, then this is a normal side-effect of using STRING data types
as opposed to CSTRING data types.

Otherwise, what do you mean by "not the same"?

                            -Ray.


Quote:
> I got a problem when I assigned a string to a string field in a table. They
> are supposed to be exactly the same thing, but when I checked them byte by
> byte, they were not. The weird thing is they are the same immediately after
> I assigned the string and put it to the record and they are not after I
> finish the record update. Is there any different between the string variable
> and string field in a table?My code is:
> get(FT2,ft:IDKey)
> if ~errorcode()
> clear(ft:FTemplate)
> ft:FTemplate = clip(TempFTemplate )
>    put(FT)
>    !here they are the same
> end
> get(FT2,ft:IDKey)
> if ~errorcode()
> !here they are not the same
> end

> Please help if you have any idea.
> Thanks a lot.



Mon, 29 Nov 2004 04:41:15 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need help moving string field using data variable at runtime

2. TEXT entry field for String variable

3. Assigning a string variable to a memo field in CW5

4. string variable within a string

5. string variables within strings

6. compare a string variable with a string literal

7. Concat variable with string and string

8. Ada String Issue: String within Strings

9. string = string(i:j) // string(k:n)

10. Change Entry Fields To String Fields.

11. printing fields from a string?

12. parsing lines with quoted strings as single fields

 

 
Powered by phpBB® Forum Software