![]() |
| | #1 |
| System Novice Join Date: Jan 2006 Location: Tehran
Posts: 1,075
| Database
__________________ Microsoft Visual Studio 2008 Professional (On Microsoft Windows XP SP2) Learn the language before using it. (C++ Books and C Books) Read the FAQ before making a problem. Then make a Google and Forum search. My code painter new version Version 0.97 DOWNLOAD NOW! (Let the pop up, pop!) SiavoshKC |
| siavoshkc is offline | |
| | #2 |
| Ethernal Noob Join Date: Nov 2001
Posts: 1,891
| perhaps you can add the file as a resource, or integrate a file dialog or something to load the file.
__________________ Here to Deceive, Inveigle, Obfuscate Since 1945 |
| indigo0086 is offline | |
| | #3 |
| the hat of redundancy hat Join Date: Aug 2001 Location: Hannover, Germany
Posts: 2,769
| I guess this is a perfect example for a config file. Real short example : http://www.ajaxline.com/node/258 Short example: http://www.ezzylearning.com/tutorial.aspx?tid=8067328
__________________ hth -nv She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate." When in doubt, read the FAQ. Then ask a smart question. |
| nvoigt is offline | |
| | #4 |
| System Novice Join Date: Jan 2006 Location: Tehran
Posts: 1,075
| All of the writings in config files and cs files about data access (database, dataset, datatable) are done by VS designer. There it puts a "|DataDirectory|" in connection string. In run time this phrase will be mapped to working directory instead of my database file directory. I should not change the designer-generated code. But I did and replaced "|DataDirectory|" by my database file path. Now program works correctly. But there should be another way to tell the designer to do so, I think!
__________________ Microsoft Visual Studio 2008 Professional (On Microsoft Windows XP SP2) Learn the language before using it. (C++ Books and C Books) Read the FAQ before making a problem. Then make a Google and Forum search. My code painter new version Version 0.97 DOWNLOAD NOW! (Let the pop up, pop!) SiavoshKC |
| siavoshkc is offline | |
| | #5 |
| System Novice Join Date: Jan 2006 Location: Tehran
Posts: 1,075
| From a thred in MSDN forum. I learned: -DataDirectory is a property of ApplicationDeployment in System.Deployment.Application NameSpace. But with only get accessor. -We should set it when the program starts with Code: AppDomain.CurrentDomain.SetData("DataDirectory", @"C:\DatabasePath...");
__________________ Microsoft Visual Studio 2008 Professional (On Microsoft Windows XP SP2) Learn the language before using it. (C++ Books and C Books) Read the FAQ before making a problem. Then make a Google and Forum search. My code painter new version Version 0.97 DOWNLOAD NOW! (Let the pop up, pop!) SiavoshKC |
| siavoshkc is offline | |
![]() |
| Tags |
| dataset, tableadapter |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| literature database: help with planning | officedog | C++ Programming | 1 | 01-23-2009 12:34 PM |
| Creating a database | Shamino | Game Programming | 19 | 06-10-2007 01:09 PM |
| Struct with a ptr to a dynamically allocated array of other structures :( | michael- | C Programming | 10 | 05-18-2006 11:23 PM |
| Developing database management software | jdm | C++ Programming | 4 | 06-15-2004 04:06 PM |
| Making a Simple Database System | Speedy5 | C++ Programming | 1 | 03-14-2003 10:17 PM |