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

Migrate from ADODC to Straight Code

Status
Not open for further replies.

cnealy

Programmer
Feb 25, 2002
32
0
0
US
I'm using VB 6 SP5 with Access 97. I created a database app in the textbook fashion using ADODC's. Now that I'm in the testing phase, I'm finding all manor of problems with multi-user access using ADODC.

I need to reconfigure my application so that I have one connection string, one connection type, etc. Currently, I have approximately 25 forms that each have multiple ADODC's that are set to:

adUseClient, adOpenDynamic, adLockOptimistic

The connection string on each control points to a data link file: c:\file.udl.

I have no idea how to reconfigure this mess so that I don't have to manage all of these data controls. When I install the app on a server, I'll have to manually change the connection string on each individual data control. What a nightmare! I also need to be using a CursorLocation of adUseServer, but my data controls won't allow me to do that.

Any suggestions would be great. I'm at wits end! :eek:(

 
Hi,

An alternative to setting up each ADODC to point to the database is to create a System DSN on the machine and then set this DSN to point to your database. The ADODC is then set up to use this DSN instead of the database directly.

Then when transfering the program to a different machine, all you have to do is to set up the DSN on that particular machine. Aslong as the DSN has the same name as the DSN that your ADODC uses, everything should be find.

DSNs are set up using the ODBC Data Source con in the Control Panel.

Hope this helps,

Kind Regards

Donald Lane
 
That's a good idea.

I think I forgot to mention that this application will be installed on 13 client machines. So, multi-user access is a big concern.

What I really want to do is get rid of the ADODC's altogether. I was just scouring one of my reference books and it said that ADODC's have so many limitations in a production environment that many developers don't use them at all.

While your solution is good, it's not where I really need to be. But, please keep posting those ideas!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top