VCurson.ImportText questions
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Jun 21 22:46:46 CDT 2004
On 6/21/04 7:35 PM, "va_refinancing at mail.com" <va_refinancing at mail.com>
wrote:
> 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...
You work on AMC or WIN ?
Where from comes file to import?
How it looks?
What line-ends it have? Mac or Win?
Try to import that file into your table using of of this GUI utils:
Valentina Studio
VAPP for MAC
viSQL for all
--
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