dbTalk Databases Forums  

ADO recordset "Open" method - options parameter

comp.databases comp.databases


Discuss ADO recordset "Open" method - options parameter in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kh.qbert@gmail.com
 
Posts: n/a

Default ADO recordset "Open" method - options parameter - 01-09-2007 , 06:15 PM






The documentation for the Open method can be found at this URL:

http://msdn2.microsoft.com/en-us/library/ms675544.aspx

It says the following about the Options parameter:

"Can be one or more CommandTypeEnum or ExecuteOptionEnum values, which
can be combined with a bitwise AND operator."

However, a bitwise AND operator will result in 0 when you combine
various CommandTypeEnum and ExecuteOptionEnum values. For instance,
combining adCmdText (binary value 1) and adAsyncExecute (binary value
10000) results in 0.

I -THINK- that the documentation should say to use a bitwise OR
operator. Combining the two constants mentioned above thusly will
result in the decimal value 17, or binary value 10001.

Does anyone have a different understanding? I just want to make sure
I'm not missing something here.

Thanks,
-Keith


Reply With Quote
  #2  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: ADO recordset "Open" method - options parameter - 01-09-2007 , 07:01 PM






kh.qbert (AT) gmail (DOT) com wrote:

[snip]

Quote:
"Can be one or more CommandTypeEnum or ExecuteOptionEnum values, which
can be combined with a bitwise AND operator."
[snip]

Quote:
I -THINK- that the documentation should say to use a bitwise OR
operator. Combining the two constants mentioned above thusly will
result in the decimal value 17, or binary value 10001.
You are correct.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
  #3  
Old   
kh.qbert@gmail.com
 
Posts: n/a

Default Re: ADO recordset "Open" method - options parameter - 01-10-2007 , 11:52 AM



Thank you.

Gene Wirchenko wrote:
Quote:
kh.qbert (AT) gmail (DOT) com wrote:

[snip]

"Can be one or more CommandTypeEnum or ExecuteOptionEnum values, which
can be combined with a bitwise AND operator."

[snip]

I -THINK- that the documentation should say to use a bitwise OR
operator. Combining the two constants mentioned above thusly will
result in the decimal value 17, or binary value 10001.

You are correct.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.