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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing VB program that automates Access

Status
Not open for further replies.

jlbsloan

Programmer
Mar 1, 2001
45
US
I am trying to distribute a VB aplication that uses an Access object to automate the import of a text file into an Access DB. I want to be able to run this on a machine that does not have access installed on it. If I run the Package and Deployment wizard I get "MSACC9.olb is missing the dependancy information". Is there an Access DLL or something to make this possible?

Thanks.
 
Yes, you need to distribute the MDAC (Microsoft Data Access Components) model with it.

The newest one available is MDAC 2.7 Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
I hope my post was helpful!!!
 
I actually need the RunTime Access to be installed with the deployment package in VB. The only place I can find to do this is with MS Office Developer Edition and it has to be in a VBA type project like Access. I tried to make a fake project in Access just to get the RunTime Access installed on the machine but it stores some kind of certificate with the Access project so that the RunTime will only work with the project it was deployed with. Does anyone know a way to distribute the RunTime Access with the Visual Studio Package and Deployment Wizard?
 
You can reference the Microsoft Access x.x Object Library in your project and use it's methods and properties in order to use the Methods and properties in Access and execute it's commands.
However, there may be (or is) a problem here concerning the MS licensing agreement. Microsoft states that you can only distribute this if the end user has a licensed version of MS Access or if you have MS Office Developer Edition. You need to check this yourself to see what the agreement is and act accordingly.

Better would be to use ADO/DAO in your project to access and import a text file. They would use the ISAM driver in this case and you can then connect to the file as a database, then using another ADO/DAO recordset object you can connect to the MDB and then INSET the records from the text file into the MDB.
 
We do have Office Developer; however it seems that you can only distribute the Runtime Access with an Office type project. Even then, the Runtime will only work with the application that it was deployed with???? This project is an interface between two applications and one of the vendors keeps changing their export format such as .CSV,.TXT,no quotes , with quotes, etc. This is why I chose to automate Access instead of writing alot of code to do the parsing, I can just pass different import parameters to Access and change very little. I just can't find a way to tie the Runtime Access to my VB project.

Thanks for any help.
 
I did this once before by using the method stated above (Using DAO to connect to the text file).
However, I had set a variable to the connect string which identifies what delimiter the text file uses, and based on a user response, (which delimiter the user wanted to use), I assigned that to the variable. The order of the fields doesn't matter either. Only the field names and absence of the fields being imported.

I your client keeps changing format (field names, absence of needed fields), then I would try to set things straight with them! Or if this is a test phase, then create a sub to do the work, assigning the field names as constants. Then you only need to change the fields names in one place.
 
The program is already finished, I am just trying to find a way to distribute it with out having to rewrite everything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top