[V4RB] vCursor.importText & booleans

Pedro fp lists at pedro.Net.au
Sun Nov 16 09:48:36 CST 2003


On Saturday, November 15, 2003, at 06:08  PM, Ruslan Zasukhin wrote:

> It seems Valentina can eat
>
>     true/false
>     on/off
>     1/0
>     yes/no

Any of the above would work for me but really cool would be
	yes/
but only because that's exactly the shape my source data is in ;)

But I might not know what works until I can figure out why this works 
in one projects ...

     s = "SELECT lunation"
     for i = 1 to 4
       s = s + ", phase" + str( i )
     next
     s = s + " FROM moon WHERE RecID = 0"

     c = mDatabase.SQLselect( s )

     c.importText( f, chr(9), chr(13) )
     mDatabase.baseObject( "moon" ).flush

but this doesn't work in another ...

     s = "SELECT * FROM "
     s = s + db.mTCDB( toTable ).name
     s = s + " WHERE RecID = 0"

     c = db.SQLSelect( s )

     c.importText( f(1) , chr(9), chr(13) )
     db.mTCDB( toTable ).flush

Watching in the debugger shows that in the first c is a read-write 
cursor but is read only in the 2nd. So I guess the question  now is 
what would cause one cursor to be read-write & the other read only?

Cheers, Pedro :-)

Web: <http://www.pedro.net.au>                    PGP Key ID: 387CD96F
Instant messaging...  AIM: bandidoOfOz  ICQ: 27671678  Jabber: pedrofp
                       MSN: mail at pedro.net.au           Yahoo: pedro_fp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"If it is permissible for human beings to harass and humiliate and
ruin other human beings in the name of profit, and to do so without
let or fine or hindrance, then it is not a democratic system we are
talking about, it is a tyranny."
       Bob Ellis in 'First Abolish the Customer', Penguin 1998, p100




More information about the Valentina mailing list