Import Example
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Mar 31 23:05:47 CST 2005
On 3/31/05 4:51 PM, "Chuck Pelto" <cbpelto at pcisys.net> wrote:
> Morning (here) Ruslan,
>
> Found the example.
>
> Have a question or two....
>
> In the code segement...
>
> dim theImportFile as FolderItem
> dim theImportCursor as VCursor
> dim iError as Integer
>
> theImportCursor = app.mDataBase.SqlSelect(SQLString.Text)
>
> theImportFile = GetOpenFolderItem("text")
> if theImportFile <> nil then
> theImportCursor.ImportText(theImportFile)
>
> iError = app.mDatabase.ErrNumber
> eError.Text = str(iError)
> eError.Text = getError(iError)
> 'eError.Text = app.mDatabase.ErrString
>
> if iError = 0 then
> doSQL
> else
> msgBox "Import Failed! (Error " + str(iError) + ")"
> end if
> end if
>
> What is the function of doing the SQLSelect() or a VCursor()?
Not sure I see what you ask.
To create cursor you should use db.SqlSelect() method.
> And if I
> wanted to import to all fields in the table, what would I enter for the
> search criteria?
Usually cursor for import should have no records on start.
So you need built it using query
select * from T where false
> [Note: I think I'd rather use the VCursor call, than
> the SQLSelect.]
No. SqlSelect() is better way.
At least this is how we all do it.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list