Wrox Programmer Forums
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics 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
 
Old November 24th, 2007, 02:23 AM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change database connection

I have set up a SQL connection using the VB2005 database connection wizard. Now, the SQL database I have connected is moved to another location, and the database name itself is changes as well. How do I make changes in my VB coding to have my application to connect to the new location? Do I have to use the wizard again to reconnect?

Any help will be appreciated!

VB-Newbee
 
Old November 27th, 2007, 05:02 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Use find to find the old string, an edit the code to hold the new string.

Many of the features of the code the designer creates are normally not shown to the programmer, but they are nonetheless there, and are in plain text like all code.
 
Old November 29th, 2007, 12:08 AM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Brian for looking into my post and answering my question. I tried in the code of the form but I can't find the place containing the string of the database path. It must be hidden somewhere. And the table adapters showing the old name, how can I change the name of the table adapter to the new database name?

Thank you!

 
Old November 29th, 2007, 03:48 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

When you search, be sure to include hidden items and so forth (there are checkboxes on the Search dialog). Everything you create through the design interface (textboxes, buttons, etc.) is represented in VB code that you can read (as opposed to VB 6 that put some things into a .frx file that you could not read).
 
Old November 30th, 2007, 01:22 AM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Brian, Thank you very much!

Song






Similar Threads
Thread Thread Starter Forum Replies Last Post
Vba to Change Pass Through Query Connection Coby Access VBA 1 April 25th, 2011 09:12 AM
Help with change postgreSQL connection to MySQL chadneiro PHP How-To 2 July 7th, 2010 12:37 PM
Database Connection to Access Database reachsevar ASP.NET 2.0 Basics 1 November 28th, 2007 08:56 AM
Change in connection string x_ray Classic ASP Basics 2 February 21st, 2006 05:10 PM





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