RDO => ADO, connection object

RDO => ADO, connection object

Post by Nikla » Thu, 11 Apr 2002 23:14:03



Hi

What is the eqvivalent ADO code for this RDO code

Dim en As RDO.rdoEnvironment
Dim cn As RDO.rdoConnection
Set cn = en.OpenConnection("", rdDriverPrompt, False)

Best regards
/Niklas

 
 
 

RDO => ADO, connection object

Post by Nikla » Fri, 12 Apr 2002 16:33:26


Hi again

I have an application which uses a database. At the moment RDO is used but
we will replace RDO with ADO because RDO do not work well with some ODBC
drivers. The application uses a DSN to connect to the appropriate database.
When application starts the user have to select a DSN in Ms Select Data
Source dialog box [ OpenConnection("", rdDriverPrompt, False) ] . After the
DSN selection we have a connection and we can get a ConnectionString from
the rdoConnection object. How do I open the "Select Data Source" dialog box
with ADO? This is the only way for me to know witch database the user want
to use.

Best regards
/Niklas


Quote:> Hi

> What is the eqvivalent ADO code for this RDO code

> Dim en As RDO.rdoEnvironment
> Dim cn As RDO.rdoConnection
> Set cn = en.OpenConnection("", rdDriverPrompt, False)

> Best regards
> /Niklas


 
 
 

1. Usage of DTS Connection Object in the ADO Recordset Object

Here is an example:
Johnny...

'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************

Function Main()
Dim countr
' Connection to SQL
set mySourceConn=CreateObject("ADODB.Connection")
set mySourceRecordset=CreateObject("ADODB.Recordset")
mySourceConn.Open="Provider=SQLOLEDB;Trusted_Connection=yes; Data
Source=ServerName; Initial Catalog=Northwind; user id='user';
password='pwd'"

mySQLCmdText= "select orderID from orders"
mySourceRecordset.open mySQLCmdText, mySourceConn
msgbox mySQLCmdText
msgbox mySourceRecordset.RecordCount

If  IsNull(mySourceRecordset.EOF)  or  (mySourceRecordset.cachesize   < 1)
Then
num=1
Else
For countr =1 to mySourceRecordset.RecordCount
num=mySourceRecordset.Fields("orderID").value
mySourceRecordset.MoveNext
Next

End if
mySourceRecordset.close
 Main = DTSTaskExecResult_Success
End Function


2. Grabbing Process Details using QA

3. ado command object not accepting connection object

4. 18661-NC-Raleigh-Object Oriented Devel.-ORACLE-Object Oriented Design-DoD-4GL-DBA

5. Share RDO connection between OLE objects?

6. pass an array or recordset into a stored proc

7. Connection Errors via ADO Connection Object

8. Replacing Access Table with DAO

9. Alternatives to Rdo, Ado and Oracle Objects

10. ADO RDO can't create object err 429

11. Alternatives to Rdo, Ado and Oracle Objects?

12. RDO 1 -> RDO 2 Problem