473,396 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

folder in the project

How can I save file in the dir "Data", which I add to the project earlier. My project' s called Sol1, so here' s the code I' m using:

Expand|Select|Wrap|Line Numbers
  1. private void OK_Click(object sender, EventArgs e)
  2.     {
  3.         RegFile = new FileInfo("Sol1.Data." + MyCombo.SelectedItem.ToString() + ".mdb");
  4.  
  5.         for (int i = 0; i < 23; i++)
  6.         {
  7.             if (RegFile.Exists == true)
  8.             {
  9.                 MessageBox.Show("Exists!", "Sol1");
  10.  
  11.                 return;
  12.             }
  13.             else if (i == MyCombo.SelectedIndex)
  14.             {
  15.                 RegFile.Create();
  16.             }
  17.         }
  18.     }
  19.  
Why it doesn' t create a file in "Data"?
Apr 4 '09 #1
1 1104
tlhintoq
3,525 Expert 2GB
Because directories don't use a period as their seperator.

"Sol1.Data." is not a valid path
Apr 4 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: pmud | last post by:
Hi, I had posted this question earlier also but got no suitable answer.The problem is that when I try to create a new project, the project gets created in a DEMO folder in wwwroot. When I hit...
0
by: George Harig | last post by:
While building my deployment project I receive the following error Unable to build folder named "FOLDER_NAME". My projects compiles fine, the deployment project dose not. Are there any rules...
8
by: vinesh | last post by:
I have sample Asp.Net Web Application project. Let me know how to keep the files related to this project (like the webform.aspx, WebForm1.aspx.vb, WebForm1.aspx.resx) in a separate folder within a...
5
by: Richard J Foster | last post by:
Hi there, I have a pair of C# projects in VS2003. The first project, a dll, is referenced in the second via a project reference. The assemblies in question are delay-signed during a...
2
by: cashdeskmac | last post by:
Why is it that when I create a new web application, the project folder containing the webform, web.config and csproj files appears in C:\inetpub\wwwroot, yet my .sln and .suo files appear in...
5
by: clintonb | last post by:
I'm a newbie when it comes to asp.net. All my prior experience is in making Windows applications in C++. In the past when I made windows applications, the project or target file would keep...
1
by: sunil | last post by:
Hi, I want to change the default installation folder to my own path. I did it by changing the application folder's DefaultLocation property. The installation works fine as long the path that I...
2
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
I made a typo on a Project name (e.g. Wong, instead of Wang). Later on I renamed the Soution, Project, WebForm., etc, except the file folder name, back to Wang. Then after I closed the VS.net and...
3
by: Mark Poppers | last post by:
I found a *.sln and an *.suo file which belong to my current project because the have the same name "TestDatabase33....." as my project. What is the purpose of these files ? If I delete them...
2
by: clintonb | last post by:
I'm using: Microsoft Visual Studio 2005 Version 8.0.50727.42 Issue 1: We have a solution with a web project and some class library projects. The web project references the class library...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.