import text files problem

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jun 4 17:46:53 CDT 2006


On 6/4/06 5:31 PM, "agustin" <porto_agus at ono.com> wrote:

Hi Augistin,

> Greetings to everybody.
> 
> I have a problem when I try to import an Access database (exported as an text
> file width fields separated by tabs) into a Valentina database.
> Aparently all works fine but the record aren´t inserted in the table.
> 
> This is a resumen version of the code I use:
> 
>   gDatabase = new(Xtra "VDatabase", #kLocal)
>   dbpath = the moviePath & "bases\plantas.vdb"
>   
>   gDatabase.Create( dbpath, #kDsc_Dat_Blb_Ind )
>   tblLatin = gDatabase.CreateTable( "latin" )
>   
>   tblLatin.CreateStringField( "latin",  40, )
>   tblLatin.CreateStringField( "clavelat",  4, )
>   tblLatin.flush()
>   
>   cursor = gDatabase.SqlSelect("SELECT * FROM latin WHERE FALSE",
> #kClientSide, #kReadWrite)
   ^^^^^^^^^^ 
    this is read only cursor

You need ServerSide

>   cursor.importText(the moviePath & "latin.txt", ";", RETURN, "UTF-8", FALSE)
> 
>   gDatabase.Flush()
>   gDatabase.Close()
>   gDatabase = void
> 
> No generates error messages, but the files aren´t inserted into the table, the
> database files are created, an de table estructure also (I think).
> What´s the problem? I´m doing something wrong?, I missed something?.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list