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

FileOpen

Hi!
I have a specific problem - I need to take some informations from a .txt
file from another computer...
I use OpenFile and the program runs perfectly...
But when I run it second time I get an error... I'm unable to give it
characterist because I have to run the program on a computer without
VS.Net...
I know only that program stops for about 10s on a line with "OpenFile"
command and there returns an error.
But if I wait before re-starting my program about a minute at the second
start it works fine... So mayby it leaves something in memory?
Help!

Code look like this (short version):

Public Sub Main
Dim fileadress As String

Dim q As Integer

Dim line As String

q = FreeFile()

fileadress = \\somenetworkadres\cmdata\file.txt

FileOpen(q, fileadress, OpenMode.Input)

Do Until EOF(q)

line = LineInput(q)

(Here I get the information from this line to my program)

Loop

FileClose(q)

End Sub
Nov 20 '05 #1
2 3092
Cor
Hi Zurg,

What is the type of the computer, I tried it and also no problems even when
I had putted in a loop of 1000 times ?

Cor
Nov 20 '05 #2
Hi Cor,
Yes, you're right - I opened and closed the .txt about 20 times without any
problems...
The error occur only in one situation:
1. I start a connection and open and close the file
2. Disconnect
3. Once again establish the same connection and try to open the same file -
i get an error
And it occurs only if I do this points quite fast...
It seems that somewhere in it's memory windows "remember" that there was a
file opened and try to re-open it with the old connection which alredy
doesn't exists... Because if it has a while to get information about new
connection it works perfectly...
In fackt I have no idea how to re-load this "memory" - of course I can kill
explorer and run it once again but it's quite drastic...
I'm afraid I just have to accept that specific error...
Anyway, thanks for attention

zurg

Użytkownik "Cor" <no*@non.com> napisał w wiadomo¶ci
news:uE**************@TK2MSFTNGP12.phx.gbl...
Hi Zurg,

What is the type of the computer, I tried it and also no problems even when I had putted in a loop of 1000 times ?

Cor

Nov 20 '05 #3

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

Similar topics

2
by: MR BIGLESWORTH | last post by:
Hi, I have A FileOpen command that opens A file outside of the local folder (where my program is). That works fine, but; I want to create a file in the local folder after that 1st file is opened,...
0
by: Wendy Attenberger | last post by:
We are using the FileOpen method to read through a .css file. It is dropping the period in front of a .css class name. (whenever the line begins with a period...it just drops it.) FYI...It...
11
by: CM | last post by:
I'm learning VB6 from a book. The following code is supposed to open a simple text file I created - putting the text into my VB text box. Private Sub cmdOpen_Click() CommonDialog1.ShowOpen If...
2
by: AussieRules | last post by:
Hi, Is it possible to add a text box to capture some extra data in the fileopendialog control. If not, is it is to mock up a copy of it ?
9
by: William Cruz | last post by:
I am working with the openfile dialogue on VB.NET express. I want the filename to appear on a label that I have on the main form when I click on a file on the openfile dialogue. How can this be...
0
by: jharikrishna | last post by:
How to use filestreams in c# How to open the fileopen window how to read the text in that file.
0
by: Subhankar | last post by:
Hi, I am trying to open a MS Project residing in a MS SQL Server. I have the following code for the FileOpen: projectApp.FileOpen("<ChouOister>\\Test Project 2", false, 0, null, null, null,...
1
by: ckb | last post by:
Hi, I need to get the fileopen saveas dialogbox in javascript.I have used the but i want to extract the location ang the file name that the user chooses in my code for further processing once the...
2
by: keane | last post by:
i have using one batch file in my VB.NET bin Directory, it loads when form load event. The Output from the batch file stored into some log file.when i am going to write those results by using...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.