Actually, I think the behavior comes from the components used to connect
to MySQL.  Delphi doesn't really care one way or the other.

Dan Cumpian


-----Original Message-----
From: Paul DuBois [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 1:41 PM
To: [EMAIL PROTECTED]
Cc: Dan Cumpian; 'Jeff Snoxell'; [EMAIL PROTECTED]
Subject: RE: SELECT and UPDATE at the same time?

At 13:23 -0500 12/19/02, <[EMAIL PROTECTED]> wrote:
>Well, the only basis I have is personal experience from connecting to a
local
>MySQL database. The components I use for connecting to MySQL with
Delphi does
>cache the records as the server returns them. However, not all the
records are
>returned at once.  As I said, it depends on how one connects to the
server.

Okay.

If that's what you observe, I won't dispute it.  But then the behavior
is probably something specific to the Delphi interface.  The underlying
behavior of the client/server protocol is somewhat different than what
you observe, so people using other APIs will likely see something
different
happening.

>
>If I'm wrong, then I apologize for any incorrect information that I may
have
>given. Just trying to help.
>
>Dan Cumpian
>
>
>
>On Thu, 19 Dec 2002 00:18:48 -0600 Paul DuBois <[EMAIL PROTECTED]> wrote:
>
>>  At 23:43 -0500 12/18/02, Dan Cumpian wrote:
>>  >Jeff,
>>  >
>>  >Not if your outer loop is in a separate query.
>>  In that case, your query
>>  >is essentially a cursor and is static once
>>  OPENed. As you move from
>>  >record to record, what you are seeing is the
>>  records at the time the
>>  >query was opened. Now, if you were to update
>>  records that you haven't
>>  >processed yet, then they may show up as
>>  modified in your outer query
>>
>>  Your basis for saying that?
>>
>>  >because (depending on how you are connecting
>>  to the database) the server
>>  >only returns several hundred rows at a time
>>  and caches them as you go
>>
>>  Your basis for saying that?
>>
>>  >through the record set. But that doesn't sound
>>  like it will impact you.
>>  >
>>  >HTH,
>>  >Dan Cumpian
>>  >
>>  >
>>  >-----Original Message-----
>>  >From: Jeff Snoxell
>>  [mailto:[EMAIL PROTECTED]]
>>  >Sent: Wednesday, December 18, 2002 12:56 PM
>>  >To: [EMAIL PROTECTED]
>>  >Subject: SELECT and UPDATE at the same time?
>>  >
>>  >Hello again,
>>  >
>>  >I'm selecting a group of records from my
>>  database. I then loop through
>>  >the
>>  >selected records and do some work based on
>>  what I find. But what I also
>>  >want to do as I interrogate each record is
>>  update some of its fields
>>  >with
>>  >new values... but won't that screw up the
>>  outer loop? I mean if I try to
>>  >
>>  >execute a query whilst looping around the
>>  result set of a former query
>>  >will
>>  >I not screw up my result set that I'm looping
>>  through?
>>  >
>>  >Also, is it possible to update specific fields
>>  of certain records within
>>  >a
>>  >SELECT query? ie can I do something like this:
>>  >
>>  >SELECT * FROM my_table WHERE Age > 50 AND
>>  UPDATE Status = "OLD"
>>  >
>>  >Ta,
>>  >
>  > >Jeff


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to