• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

OLE DB connection. Where to start?

I have an some dbf tables (VB 5 I think) that are a part of a custom written application.  I need to be able to setup a live connection between the dbf file and MS Outlook so I can view names and addresses and possibly edit some of the data in the fields.  The tables will need to be acessible from Outlook and my custom app at the same time.  The primary purpose is to view the data and not modify it.  Where do I start?  Is this going to be complicated?  
0
pauljnye
Asked:
pauljnye
3 Solutions
 
wraith821Commented:
it may be easier to use ODBC. you can create an ODBC DataSource Using the Microsoft dBase Driver (*.dbf). Point it to the directory the files are in. then add Microsoft ActiveX Data Objects Reference to your project. then use

Dim db as New ADODB.Connection
db.open "DSN=[DSNName];uid=;pwd="

for oledb, you might be able to use (but i'm not sure)

db.open "Driver={Microsoft dBase Driver (*.dbf)};DefaultDir=[directorypath];uid=;pwd="
0
 
IThemaCommented:
For what I have heard, ODBC connections are slow. Unfortunately, I can't tell this from my own experience. I do believe that, in order to setup a DSN runtime, you need administrator rights. I doubt that every end user has these rights. Otherwise this DSN needs to be setup manually. In practice, this means that some system administrator would have to come to set up the connection according to your DSN specifications that you provide.

Another option is to declare an ADO connection and set its connectionstring (source: http://www.connectionstrings.com) as follows:

Dim objMyConn As ADODB.Connection

Set objMyConn = New ADODB.Connection
objMyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\MyDBFolder\MyDatabase.dbf;Extended Properties=dBASE IV;User ID=Admin;Password="

'Do things with your connection here


Good luck,

Luc Derckx
0
 
IThemaCommented:
Hi,

We posted possible solutions on how to establish a connection with a DBase database. Allthough the solutions provided are different, I believe that one of them would've worked. We did abandon giving pauljnye examples on how to get a list of contacts for example. We also abandoned in mentioning where the outlook database can be found, but I don't think I'm speaking for myself when saying that we had the general idea that pauljnye already knew where the database could be found.

I also believe that pauljnye wasn't specific enough when she asked for help. I believe we may have posted solutions to all possible things that can be done with an outlook database before scoring bull's-eye. I therefore believe that pauljnye should've stuck to this topic to ask for more specific information once pauljnye had the connection working.

I therefore recommend to split points between the three of us. I believe a solution has been provided in telling pauljnye how to establish a connection and that all of us would've dived into the subject as soon as pauljnye would ask for more specific info.

Cheers,

Luc Derckx
0
 
GPrentice00Commented:
Given as well, "Where do I start?" as part of the question, generalities tutorials and suggestions are good.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now