[V4RB] ImportText not working
Kem Tekinay
ktekinay at mactechnologies.com
Sun May 22 17:06:45 CDT 2005
On 5/22/05 4:07 PM, Frank Schima at macsforever2000 at goodeast.com wrote:
> FYI, ImportText is working fine for me in 2.0.4fc1. My code is:
>
> theImportCursor = mDatabase.SQLSelect(theSQLString,
> EVCursorLocation.kServerSide, EVLockType.kReadWrite,
> EVCursorDirection.kRandom)
> theImportCursor.ImportText(theImportFile, chr(9),
> EndOfLine.Macintosh, "ASCII")
>
> I think the parameters in your SQLSelect statement are incorrect. But
> also I do not use the 5th parameter (InHasHeaderColumn which defaults
> to False) for ImportText.
You're right, I had switched the LockType and CursorDirection, and skipped
CursorLocation entirely. My new code is this:
curs = gDB.SQLSelect( "SELECT * FROM Zip_Codes WHERE false",
EVCursorLocation.kServerSide, EVLockType.kReadWrite,
EVCursorDirection.kRandom )
curs.ImportText( f, chr( 9 ), chr( 13 ), "ASCII", true )
This works. Thanks.
Note that EVCursorLocation.kClientSide does not work. Should it?
And, even if the answer is "no," it still shouldn't quit without at least an
exception, should it?
__________________________________________________________________________
Kem Tekinay (212) 201-1465
MacTechnologies Consulting Fax (914) 242-7294
545 Eighth Avenue, Suite 401 Pager (917) 491-5546
New York, New York 10018 http://www.mactechnologies.com
To join the MacTechnologies Consulting mailing list, send an e-mail to:
mactechnologies_consulting-subscribe at yahoogroups.com
More information about the Valentina
mailing list