setting the DBPROP_MSDAORA_DETERMINEKEYCOLUMNS property of the MS OLEDB provider to False

The program is using MS OLEDB provider and there is a query

select count(*) from table where column1 is null;

This query gives the following error "ORA-00937: not a single-group group function". However this works fine with SQL Plus.

I came to know that if DBPROP_MSDAORA_DETERMINEKEYCOLUMNS parameter of MS OLEDB  is set to True, then the pseudo column "rowid" is appending to the select list....  so while executing the query becomes

select count(*).rowid from table where column1 is null;

Hence the error. Now I need to set the parameter
DBPROP_MSDAORA_DETERMINEKEYCOLUMNS  to false. How can I do the same?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


you can do this in your connectionstring.

please see below an example "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=Username;Password=asdasd;DBPROP_MSDAORA_DETERMINEKEYCOLUMNS=false;"


chandra_shaileshAuthor Commented:

Thanks for the response. I tried setting both the DBPROP_MSDAORA_DETERMINEKEYCOLUMNS and DBPROP_UNIQUROWS to false. But the oracle error "ORA-00937" still persisted. Then I tried changing the cursor type from ClientSide to ServerSide and this seems to work. Now I have a connection string which looks like "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=Username;Password=asdasd;Data Source=abc;"

and while opening the recordset I am using the

psd_rs.CursorLocation = adUseServer.

Using a server-side recordset is ill-advised for any database app that will require numerous connections presently or in the future.  If this is the case in your situation, I would try using  a client-side recordset and work through the problems you are having.  Perhaps you need to set the dynamic property on the recordset object and not the connection object:

dim psd_rs as adodb.recordset
set psd_rs = new adodb.recordset

set psd_rs.activeconnection = <open oracle connection variable>" DBPROP_MSDAORA_DETERMINEKEYCOLUMNS") = false

PAQed with no points refunded (of 500)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.