Re: CursorLocation for Execute Method



Dear Bob,

Thank you very much for your answer.
By the way, this is my first post.

"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:ed8DhBkCHHA.3524@xxxxxxxxxxxxxxxxxxxxxxx
Philip Siaw wrote:
I guess I do not fully understand the effect of setting the
CursorLocation to adUserServer or adUseClient when calling the
Execute method.

I was trying to call the Execute method for the following SQL
statements: 1) INSERT
2) UPDATE
3) DELETE

There is no cursor when calling these statements. So CursorLocation has
absolutely ZERO effect. This has been stated several times to you. Why do
you make us keep repeating it? (I hope i am not confusing you with another
person who was asking similar questions)

The ONLY time a cursor is involved is when using a SELECT statement.

The reason for using adExecuteNoRecords is that the default behavior for
the Execute statement is to construct a Recordset object in memory in
which it will place any records that are returned by the statement's
execution. Using adExecuteNoRecords saves cpu and resources when executing
a DML statement that does not return records.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



.



Relevant Pages

  • Re: CursorLocation for Execute Method
    ... CursorLocation to adUserServer or adUseClient when calling the ... I was trying to call the Execute method for the following SQL ... There is no cursor when calling these statements. ...
    (microsoft.public.data.ado)
  • Re: command timeout does not work
    ... CursorLocation). ... >> openning the Recordset passing the command object, ... >> Thanks Rani ... >>> How do you execute your SP? ...
    (microsoft.public.data.ado)
  • Re: Recordset & Sort
    ... After getting your Recordset back from Execute, ... CursorLocation, CursorType, LockType are and display that in your next ... Finally, .Sort() method is not bad, but I would rather use SQL's ORDER BY ...
    (microsoft.public.data.ado)
  • Re: Why doesnt my thread terminate?
    ... A suspended thread does not execute until resumed, so when you're ready for the thread to run, call Resume on the object. ... Only do VCL stuff in the main VCL thread. ... The only reason this appeared to work in your test was that you called the Execute method directly from your other code, so everything ended up executing in the main VCL thread anyway. ... Go take a look at what the Terminate function does. ...
    (alt.comp.lang.borland-delphi)
  • Re: CoInitializeEx and DirectShow?
    ... > calling a method that exists on a COM object created in a different thread? ... > The method would, of course, execute in the calling thread, not the creating ... other than to avoid calls to PeekMessage and SendMessage during ... calls to other objects in the same apartment/thread. ...
    (microsoft.public.win32.programmer.directx.video)