Computing.Net > Forums > Programming > ADO Control in VB 6.0

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ADO Control in VB 6.0

Reply to Message Icon

Name: tommypickles
Date: September 28, 2004 at 08:33:52 Pacific
OS: Microsoft Windows XP Prof
CPU/Ram: ???
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Mark.UK
Date: September 28, 2004 at 15:11:37 Pacific
Reply:

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


0

Response Number 2
Name: airski
Date: September 29, 2004 at 09:16:35 Pacific
Reply:

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.


0

Response Number 3
Name: tommypickles
Date: October 1, 2004 at 03:41:39 Pacific
Reply:

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


0

Response Number 4
Name: avallejor
Date: October 19, 2004 at 15:50:51 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: ADO Control in VB 6.0

Declaring Variables in VB 6.0 www.computing.net/answers/programming/declaring-variables-in-vb-60/9957.html

VB 6.0 Write datagrid in 4.0 www.computing.net/answers/programming/vb-60-write-datagrid-in-40/8630.html

Function in VB 6 www.computing.net/answers/programming/function-in-vb-6/9626.html