Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am linking a database to Visual Basic to display and append data through VB. I create an OCDB (i think those are the initials!) and then link it to the ADO Control. However, if i wish to export the program, how can i export it, creating an .exe then an instalation file to install on annother sytandalone PC, but still keeping the ADO control linked to my database?? E.g., if it runs on annother pc, how can i program it to access me Microsoft Access database? Sorry, the wordings awful, i find it hard to explin what i need!!
Tommy Pickles

Go to www.tek-tips.com get on the associated forum. You can get good advice there about ADO and databases. The ADO control you have linked to your database needs to be linked using code and not the wizard. The code will then automatically find the correct directory of the database without you having to manually select it.
M

If you can get or have the Enterprise Edition of VB6 you can create your own .exe. You can also use the package and development wizard to create a setup file, then you could burn it to CDs and install your program on any PC.
If you are running the program over a network, just set your path to your access db to be local, create an exe of your program, put both the exe and the db in the same network folder, copy a shortcut of the exe file to the users desktop and your done.
NOTE: This will more than likely require you to register some .OCX files on the users PC, but that's not a big deal.

I have VB 6.0 Prefssional Edition, so i just set the install dataase option to loal then?? The Professioal editin has the Package and Development edition. Is this OK to use ADO with no code and create a setup file to use on a standlone computer.
Tommy Pickles

Tommy,
I don't know if it is now late but...
Leave the ado control properties "ConnectionString" and "Recordsource" blank. Then, at code level, use this code in the Load event:
stri$ = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\yourown.mdb;Persist Security Info=False"
adodc1.ConnectionString = stri$and then
adodc1.RecordSource = "carpetas" or any other sql sentence.
Then, you must also link each control datasource at code level, i.e:
Set txtDescripcionCarpetas.DataSource = adodc1

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |