Using ADO Data Control in a compiled project

How to package and deploy a project so you are not restricted to a spe

Page 1 of 1

3 Replies - 2725 Views - Last Post: 16 September 2009 - 07:34 AM Rate Topic: -----

#1 C Stones  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 07-September 09

Using ADO Data Control in a compiled project

Posted 15 September 2009 - 05:27 AM

All the tutorials I have studied using the ADO DC control tell me enough to get my form up and running with the Access database associated with my project. My concern is that the connection string is "Hardwired" to a specific database in a specified folder on a specified drive. The ADO is "Hardwired" to work with this address.

Am I understanding the process correctly that if I compile my project, then package and deploy it, when the user installs it on their computer, it has to be installed to the same directory configuration?

How do you set up the ADO so that it will work the project and the database from whatever directory and folder the user installs it to? I tried to use Apps.path in the ADO properties, but got it all wrong.

Is there a way to do this?

Many thanks for your help.

CS

Is This A Good Question/Topic? 0
  • +

Replies To: Using ADO Data Control in a compiled project

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Using ADO Data Control in a compiled project

Posted 15 September 2009 - 08:14 AM

Well, this depends upon what your target OS is. If anything above XP then you will need to jump through some hoops to accomplish what you want.

http://www.vbforums....ad.php?t=466340

http://www.vbforums....202#post2807202



Good Luck
Was This Post Helpful? 0
  • +
  • -

#3 C Stones  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 07-September 09

Re: Using ADO Data Control in a compiled project

Posted 16 September 2009 - 04:14 AM

View Postvb5prgrmr, on 15 Sep, 2009 - 07:14 AM, said:

Well, this depends upon what your target OS is. If anything above XP then you will need to jump through some hoops to accomplish what you want.

http://www.vbforums....ad.php?t=466340

http://www.vbforums....202#post2807202



Good Luck


Thanks for the help, there was some interesting reading and things to be aware of. What I was realy looking for, was to find a way to get the ADODC to look for a named database in its current folder, or a sub-folder of the current directory.

Meanig to say; if I write the programme in C:\[MyProject] and save the database to C:\[MyProject]\[MyFiles]\MyData.mdb I would like the user to be able to save the programme on a drive of their choice, and a directory of their choice. The data base will always be in a sub folder of the programme directory. But the ADO connections always seem to want a full path to find the database, and not allow you to only look in a sub folder of the current directory.

thanks,

cc
Was This Post Helpful? 0
  • +
  • -

#4 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Using ADO Data Control in a compiled project

Posted 16 September 2009 - 07:34 AM

Well then you could use a common dialog control and the registgry to save the path to the database...


Good Luck
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1