Why won't this update statement work?

Kristafer Vale kristafer at comcast.net
Sat Mar 13 15:53:13 CST 2004


Ahh, that clears it up just fine. Sorry for the newbieness to this, I guess
the experience I've had with databases up to this point (MS ACCESS and
Coldfusion/flash only) didn't prepare me for that concept. I understand it
now, so thanks very much for your help!


Kristafer S. Vale
VK-iNTERACTiVE
6011 Medici CT #301
Sarasota, FL 34243
407-924-3025


-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ruslan Zasukhin
Sent: Saturday, March 13, 2004 3:49 PM
To: valentina at lists.macserve.net
Subject: Re: Why won't this update statement work?

On 3/13/04 10:29 PM, "Kristafer Vale" <kristafer at comcast.net> wrote:

> Hmm, I guess I'm just used to things like coldfusion and what not where
you
> can query the database for a number of records and then loop through those
> records changing one value as you go and automatically updating the
database
> as it goes. I confess to not completely understanding cursors and their
> uses. 

> I assumed that they were just Valentina's way of selecting records now
> I see it actually copies the data in question and allows you to perform
some
> operations on that copy of the data, but then how does it put the data
back
> to the original table? I'm confused, and I've re-read the docs many times,
> could you explain cursors a bit more to me? Offline is fine,

I am sure cursors are NOT just in Valentina.

You can meet them in many DB related products/frameworks
    (MFC, ADO, OLE DB, ..)

Think about cursor in the next way:

1) you can have MANY cursors on the same table(s)

2) Cursor is result of SELECT query.

3) Cursor create tmp table of result.
although sometimes Valentina do optimization and do not create tmp table.

4) Cursor actually very similar to Table.

5) you can navigate record of cursor.
        Next/Prev, First/Last

6) Cursor have own RECORD BUFFER, so each cursor have own CURRENT RECORD.

7) IF cursor is not ReadOnly you can MODIFY its records.
    usually this is when you do SELECT on single table.

8) so let you have cursor which you can modify.
You can 
    -- fill fields of cursor and say AddRecord()
        this will add record to cursor
        AND to table that cursor was SELECTed for.

        how Valentina do this? Cursor know its table.
        cursor know how ITS records related to Table records.

    -- in the same way you can UPDATE DELETE records of cursor


-- 
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
-------------------------------------------------------------

_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list