Hello, I have problem with this RecordSet. Do not open with "select distinct". Why?Without "distinct" recorset is opened without problems.Private Sub Command1_Click()Dim Cnn As New ADODB.ConnectionDim rs As New ADODB.RecordsetDim CadOracle As StringDim CadSql As StringCadOracle = "DSN=Oracle;UID=RECAUDA;PWD=xxxx;DBQ=orcl"Cnn.Open CadOracleCadSql = "select distinct NOMBRE_MUNI_SUJ from paddgc53"rs.Open CadSql, Cnn, adOpenKeyset, adLockOptimistic, adCmdTextWhile Not rs.EOF rs.MoveNextWendCnn.CloseEnd Subthanks.

Showing Answers 1 - 2 of 2 Answers

Chandra

  • Mar 17th, 2006
 

In this case record set is open  in adOpenForward and adLockreadonly

or (by removing the loaktype or open mode)

rs.Open CadSql, Cnn

  Was this answer useful?  Yes

sulakshana

  • Jan 16th, 2007
 

Try out with adopendynamic,adlockoptimistic.Also try it by  giving

select distinct(column_name) from table_name

do reply

Thanks and regards

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions