[FAQ] ODBC Connection for Valentina
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri May 7 23:42:37 CDT 2004
On 5/7/04 10:59 PM, "Simon White" <Simon_White at on.aibn.com> wrote:
Hi Simon,
> Hi Ruslan
>
> What is the difference between VBaseObject and VCursor when a VCursor is
> created using oDatabase.SQLSelect("Select RecID,* From myBaseObject",2,3,2)
VBaseObject -- Is abstraction of TABLE in the database.
i.e. It contains ALL records and ALL fields.
Vcursor -- is abstraftion of record set.
it can be build on one or __few__ tables.
it can select only few records and fields of table(s).
> and why does the IVCursor not have a GotoRecID Function?
Because cursor can be built on SEVERAL tables.
> Since the IVCursor does not have a GotoRecID how can you randomly move
> around in the cursor?
Cursor have similar function: GoToPosition().
> The reason of these questions is that I created all my cursors with "Select
> RecID,* From myBaseObject" and then used the ExportText method to create
> text files which I then import into a matching VFP table. This works fine.
Frankly saying I think this is not the best way.
Assume you have select 100,000 records.
IT will take MANY TIME to load them to text file, then import to DBF.
It is better use Server Side cursor, load records from server by 10-20 at
once.
> Now I want to write back the changes made in the VFP tables to the VCursor
> object in Valentina. My idea was to goto a particular RecID and update the
> cursor buffer with the new values and then use UpdateRecord to write the
> changes back to the baseobject.
You can simply go to Nth record of cursor and do what you want.
RecID even is not needed as I see.
> Rather than go through each record
> individually I was planning only to update the records that had been
> changed. The fastest way to do this was to use the GotoRecID method.
>
> Perhaps you have a better technique to write changes from VFP Table to a
> VCursor.
>
> Thanks
> Simon White
--
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