import text files problem

agustin porto_agus at ono.com
Sun Jun 4 17:20:11 CDT 2006


I forgot to say I´m working with windows xp and director mx.

----- Original Message ----- 
From: "agustin" <porto_agus at ono.com>
To: <valentina at lists.macserve.net>
Sent: Sunday, June 04, 2006 4:31 PM
Subject: import text files problem


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)
  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?.
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina 



More information about the Valentina mailing list