473,388 Members | 1,352 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,388 software developers and data experts.

Will a .txt file open ok from multiple locations if on a network?

I'm writing a simple program to dish out incoming leads.

I don't understand database programming in c# and this needs to be
finished like yesterday - so i dont have the luxury of spending a
couple of weeks reading up on ADO.

I have used a simple technique in the past of storing data in a text
file and just reading this into an array and populating a listview
control from this.

This app will be used by about 6 users on a MS Network (Client/Server).
If i store the data txt file on the network share and have the 6
machines use this same file, will this be ok?

or will i have problems? (given that the machines update, and and
delete some basic data in this file)

If it is problematic what's the SIMPLEST solution to this?

Thankyou!

Gary.

Jan 19 '07 #1
1 1153

You can run a
ExecuteReader

against a text file.

You can find the connection string here:
http://support.microsoft.com/kb/326548
(DO NOT USE HTE ADO object from this KB)

You can find an example of an ExecuteReader here
http://searchsqlserver.techtarget.co...188419,00.html
Make SURE you do a dataReader.Close when you're done with it.

IDataReader idr = null;
try
{
//use the idr here
}
finally
{
if(null!=idr)
{
idr.Close();
}
}
"Gary" <ga********@myway.comwrote in message
news:11**********************@51g2000cwl.googlegro ups.com...
I'm writing a simple program to dish out incoming leads.

I don't understand database programming in c# and this needs to be
finished like yesterday - so i dont have the luxury of spending a
couple of weeks reading up on ADO.

I have used a simple technique in the past of storing data in a text
file and just reading this into an array and populating a listview
control from this.

This app will be used by about 6 users on a MS Network (Client/Server).
If i store the data txt file on the network share and have the 6
machines use this same file, will this be ok?

or will i have problems? (given that the machines update, and and
delete some basic data in this file)

If it is problematic what's the SIMPLEST solution to this?

Thankyou!

Gary.

Jan 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Tola | last post by:
In my case of study, my teacher gave me a project, after I analysed the problem I found that I had to used open the file on the other machine? Please help? Thank you in advance. Tola CHROUK
0
by: Vai2000 | last post by:
Hi All, I am writing a winsvc which monitors file changes on two or more network paths...How can I accomplish this using the FileSystemWatcher? I know the above can be applied to Sub Directories...
7
by: Vai2000 | last post by:
Hi All, I have couple of servers in DMZ , I need to do some File I/O on them from my internal servers...The File I/O are going to be quite large so obviating WebService option (not sure about...
1
by: dwainew | last post by:
Problem: I'd like to archive off the contents of a text file. However, other processes may have the file open, so MoveTo(newfilepath) can't be done, as far as I've found. Start with a 5 MB...
4
by: Robert Iver | last post by:
Hello everyone, I am trying to create an application that utilizes a SQL Mobile database. I have included that database in my main project, and it compiles and debugs just fine. I then...
17
by: shineofleo | last post by:
Here is the situation: I wrote a VB programm, which stores all the information in a single Access database file using jet engine. It worked well, however one of my customs reported that there was...
0
by: jephperro | last post by:
Hi, I'm trying to do something with multiple xml files and am wondering if it is possible. I have 2 XML feeds: One is a list of locations, LOC.XML One is a list of products,PROD.XML I...
2
by: pandehrushikesh | last post by:
I am doing setup project in VS 2008. I used custom action to select file from local drives. On the button click of custom action form, I am launching Open file dialog as ...
2
by: pandehrushikesh | last post by:
I am using Vista Business SP1. When I run some application "As Administrator" (even if I am administrator), Open file dialog does not show the mapped drive or network locations. any Idea???
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.