Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
| Search | Today's Posts | Mark Forums Read
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 2nd, 2009, 12:06 PM
Authorized User
 
Join Date: Feb 2008
Location: Keighley, , United Kingdom.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Question Changing a connection string

Hi
I have forms where I have used the "Add New Data Source" and then follow the panels and make connection and create my project.

If I run on another computer or move the database to another drive I get an error "connectionstring G:....." not found (or similar). That is is true I have moved the data source from one drive to another.

What is the best way to change it.

I can do it by editing the VB 2005's project XML files but this seems a bit error prone - is there no way - or must I write a program to do it!
__________________
Pat
  #2 (permalink)  
Old March 29th, 2009, 09:00 AM
Authorized User
 
Join Date: Feb 2008
Location: Keighley, , United Kingdom.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection string

Hi How I got around this problem.

This is a problem in testing when testing on different PC's.

To get around this I put my database in the home folder - the folder that contains the bin file. Then I seem to be able to move the project about.
If you reply yes to copy to project folder (bin/Debug) then it will be the (bin/Debug) version that is updated and the original in the home folder remains unchanged - next time you run the version form the home folder (the unchanged version) gets copied to the bin/debug folder.
If your reply no to copy to project folder the version in the home folder will be updated, so needs backing up.
__________________
Pat


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing a string? hewstone999 Access VBA 1 April 15th, 2008 10:57 AM
CRYSTAL REPORT 9 Changing Connection Properties aquiintac VB Components 0 November 6th, 2007 05:17 AM
changing connection string at runtime kscase VB Databases Basics 2 July 3rd, 2007 10:47 AM
changing numeric string to number not possible? Brian Campbell XSLT 1 November 16th, 2006 06:36 PM
Changing length of string automatically ryanvdm2 Classic ASP Basics 5 September 4th, 2005 06:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.