VCurson.ImportText questions

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jun 21 22:44:11 CDT 2004


On 6/21/04 7:35 PM, "va_refinancing at mail.com" <va_refinancing at mail.com>
wrote:

Hi Jon,

First of all, if your project is so simple as this code,
You can send it to me for testing.

> Ruslan,
> 
> I would have anticipated some sort of error condition if I attempted to import
> into a read-only cursor.  I changed kClient to kServer, but I still encounter
> the same problem.  I try to run the import, and while I get no errors reported
> from Valentina, nothing is imported into the table.  Is there something else
> that I'm doing wrong here?  Here's the modified code:
> 
> Dim result As Integer
> result = mDatabase.SQLExecute("CREATE TABLE test (col1 long, col2 long, col3
> long)")
> 
> If mDatabase.ErrNumber <> 0 Then
>   MsgBox("Valentina error " + Str(mDatabase.ErrNumber) + ": " +
> mDatabase.ErrString)
> End If
> 
> Dim theImportFile As FolderItem
> Dim theImportCursor As VCursor
> 
> theImportCursor = mDataBase.SqlSelect("SELECT * FROM test", kServer,
> kReadWrite, kRandom)
> 
> theImportFile = GetOpenFolderItem("")
> If theImportFile <> Nil Then
>   theImportCursor.ImportText(theImportFile, ",")
>   If mDatabase.ErrNumber <> 0 Then
>     MsgBox("Valentina import error #" + Str(mDatabase.ErrNumber) + ": " +
> mDatabase.ErrString)
>   End If
>   mDatabase.Flush
> End If
> 
> 
> If anyone can point me to a simple example of using ImportText, I'd love to
> look it over.  As it is, I'm stumped...
> 
> Thanks,
> 
> Jon
> 
> 
> P.S. - Sorry to all for the typo in the subject line.  It obviously should
> have been VCursor.ImportText (in case anyone uses a text search for this topic
> in the future...).

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list