Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RDO to ADO

Status
Not open for further replies.

motto

Programmer
May 28, 2000
23
0
0
IN
Hi,<br><br>&nbsp;&nbsp;As we are developing a Financial Package<br>we have been using the RDO to connect our<br>database (ORACLE 7.3) now we want to more<br>to ADO but not disturbing the earlier development<br>done in RDO.<br>For the new enhancements in our product in the<br>future we have plans to go for ADO.Is it<br>Possible to achieve like this.Should we have<br>another connection for ADO.How do we achieve this.<br>Hope my question is clear.<br>Kindly give some solution on this,<br>It is very urgent.<br><br><br>Thanks in advance<br>Motto<br>
 
Hi,<br>I still don't get what you meant. can you be more specific?<br>Are you planning to using ADO and replacing the RDO or use both of them in your program?
 
Hi,<br><br>&nbsp;&nbsp;&nbsp;I will not touch my existing RDO stuff<br>I want my future programs to work in ADO.<br>That's my question.<br>How do i do it.<br><br>Thanks in advance<br>Motto
 
Hi Motto,<br><br>First you should add ADO reference in your app. In project references list, search the M's and mark Microsoft ActiveX Data Object 2.* Library. Also mark the Microsoft ActiveX Data Objects Recordset 2.* Library.<br><br>If you're using Windows2000 then the latest version of ADO should be ADO 2.5.<br><br>Second, open the project component list and check the Microsoft ADO Data Control 6.* (OLEDB). This is the data control you can use to manipulate data.<br><br>After that, you can start build connection to your database.<br>You can access database through ODBC or using OLEDB Provider (make sure you choose the right provider).<br><br>Here some example of open ADODB connection using SQL Server provider :<br><br>'-------------------------------------<br>Dim cnt As New ADODB.Connection<br><br>cnt.ConnectionString = &quot;Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;PWD=; Initial Catalog=Test;Data Source=ONE&quot;<br><br>cnt.Open<br>'-------------------------------------<br>&quot;Data Source&quot; above is the server name,<br>&quot;Initial Catalog&quot; is the database name.<br>The value of cnt.ConnectionString can be different, depend on the selected provider.<br><br>Usually I work with SQL Server, not Oracle. If you wish to connect to Oracle then choose MSDAORA as OLEDB provider.<br><br><br>hope this helps.<br><br>Good luck!<br><br>oneshadow<br>
 
How is your Oracle licensing set up?&nbsp;&nbsp;If your license is set up per connection, then you have doubled your costs.&nbsp;&nbsp;I have heard that these licenses are not cheap.
 
By the way, motto, the advice oneshadow gave you was good, but a couple things you should know:<br><br>If you reference the Microsoft ActiveX Data Objects 2.5 Library then you should not reference the Microsoft ActiveX Data Objects Recordset 2.5 Library.&nbsp;&nbsp;The second is a subset of the first, which only has the Recordset object.&nbsp;&nbsp;The first has Recordset, Connection, Record, Command, etc.&nbsp;&nbsp;The Recordset library is good if you are passing recordsets to a middle tier, but not using any other ADO objects.&nbsp;&nbsp;It makes the client install lighter.&nbsp;&nbsp;You would then use it INSTEAD of the other library.&nbsp;&nbsp;Since it sounds like you need a Connection object, you should reference Microsoft ActiveX Data Objects 2.5 Library, but not the Recordset library.<br><br>Also, under Components, only add the Microsoft ADO Data Control 6.* (OLEDB) component if you are using bound controls on your forms.&nbsp;&nbsp;If you are using code to read data and then populating the fields in code, you do not need a reference to this component.<br><br>Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top