Import method not work

Thorsten Hohage thohage at genericobjects.de
Mon Jun 22 16:18:19 CDT 2009


Hi Bill,

after some initial thought I decided to use generate SQL update  
statements in my RB-framework, so this answer may not have based on a  
very strong foundation.

On 2009-06-22, at 23:01, Bill Mounce wrote:

> I am doing a simple import, and the data is not transferring from the
> tInput variable into the Valentina field. I am sure I am missing
> something simple. Any help? The method is in the boPerson table where
> dbWord exists.

So this means this method is in a class that is a subclass of VTable -  
right? Other way this would not make much sense to me.


>    tInput=t.ReadLine
>    SetBlank
>    dbWord.Value = tInput
>    AddRecord


First of all, what I'm completely missing here is the IMHO more then  
necessary encoding handling, because RB strings are always in wrong  
encoding, especially when readed from disk. This may not be visibe to  
you, when using only "US-text" but even when not visible it may be  
wrong.

Using ".Value" is always a risky game, too. It might look appealing on  
the first view, it can always cause many issue in case the data types  
are not as clear as they should or RB has any other issue.

SO I would recommend to try to use

	dbWord.SetString(tEncodedInput )

here.


regards,

Thorsten Hohage
-- 

Valentina Technology Evangelist
generic objects  GmbH - Leiter Solution Center Nord



More information about the Valentina mailing list