PDA

Click to See Complete Forum and Search --> : ole db


gregghoush
Apr 10th, 2000, 07:40 AM
How hard is it to convert from RDO to OLEDB, and does vb 5 support OLEDB in any way. waht if the databae's manufacturer only supports ODBC? How do i get around that?

Jaguar
Apr 12th, 2000, 01:39 AM
Never done it (I went from DAO to ADO; between projects). Well, there are certain functions and properties that RDO used different from ADO, but it's the functionality of ADO that you must become familiar with. (Comments from anyone else?)

Yes, VB5 can use ADO. 'Provider=MSDASQL' is the OLE DB provider to access ODBC drivers. This is what you do if you want to use the Text Driver. If you want to access the vendors driver, you need to put the name of it as it appears in the Control Panel|ODBC|Drivers tab.
'-------------------------------
' Create a new connection
'-------------------------------
Set TextConn = New ADODB.Connection

'-------------------------------
' Set its properties
' MSDASQL is the ODBC Provider required to
' access the Text Files DSN
'-------------------------------
TextConn.Provider = "MSDASQL"
TextConn.ConnectionString = _
"DSN=Text Files;" & _
"Driver=Microsoft Text Driver (*.txt; *.csv)"

'-------------------------------
' Open the Connection
'-------------------------------
TextConn.Open

'-------------------------------
' Designate what the default database is
' In this case it's a directory
' For a network it would be -> \\Server\Dir\Dir\Dir\
'-------------------------------
TextConn.DefaultDatabase = "c:\"