![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2007
Location: Bear, Delaware
Posts: 3
Rep Power: 0
![]() |
Changing what database to use
Ok here is the question. I have been spending several days trying to find an answer. To set some background first. I am using VS 2005, and using the data wizard to set up my data source. Now, I have created a program that uses a database file to store data for one user. My question is this. Is it possible to load a different database and repopulate the tables in the existing dataset during runtime? Both database are of the same architecture.
On another note. Would it be better for me to just write all the code to connect to the database and populate the dataset with all the data from the get go, or is using the data source wizard a good way to go?
__________________
Typing it one line at a time. |
|
|
|
|
|
#2 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3
![]() |
Re: Changing what database to use
For the first question, you can connect to another DB using a different connection string. Once connected, if the queries are the same you can use the same queries.
For the second question, it depends on your programs needs and how much you care about performance. There's benefits to going both ways.
__________________
<insert disclaimer here> <insert shameless plug for Visual Studio here> |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Storing BLOBs in a database - problem | jonyzz | Other Programming Languages | 8 | Jan 31st, 2007 4:38 AM |
| searching an access database? | designXperts.net | Visual Basic .NET | 12 | Nov 27th, 2005 5:03 PM |
| mySQL: Changing unique database to fulltext | BAS1X | PHP | 2 | Oct 24th, 2005 9:14 PM |
| Using ODBC to connect to a remote database in a C program | bigi | C++ | 1 | Mar 8th, 2005 3:19 PM |