IOException with ASCII data import
Author: Flaviog2005
Creation Date: 10/7/2011 9:47 AM
profile picture

Flaviog2005

#1
Windows 7, ITALIAN, x64,
decimals separator ","
thousands separator "."

I have lots of data in this format
DAX
Date, Time, O, H, L, C, V, I
12/19/96, 0931,15630.0000,15630.0000,15630.0000,15630.0000,0,0
12/19/96, 0932,15590.0000,15620.0000,15590.0000,15620.0000,23,0
12/19/96, 0933,15620.0000,15620.0000,15610.0000,15610.0000,38,0
12/19/96, 0934,15610.0000,15610.0000,15605.0000,15605.0000,78,0
........
FIB
Date, Time, O, H, L, C, V, I
12/19/96, 0931,15630.0000,15630.0000,15630.0000,15630.0000,0,0
12/19/96, 0932,15590.0000,15620.0000,15590.0000,15620.0000,23,0
12/19/96, 0933,15620.0000,15620.0000,15610.0000,15610.0000,38,0
12/19/96, 0934,15610.0000,15610.0000,15605.0000,15605.0000,78,0
12/19/96, 0935,15595.0000,15595.0000,15590.0000,15595.0000,28,0

I used "Create a new data set" with
Date Format:dd/MM/yy
Time Format:HHmm
Field separator:Comma
Decimal Separator:Period
Thousands Separator:None
Ignore First Lines in file:1
Ignore Last Lines in file:0
Volume Multiplier:1
Implied Decimals:0

if I try to import the data, I get an error. NET
Here follows log
Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.IO.IOException: Il processo non può accedere al file 'C:\Borsa\MSRT\Luca\bunddecr.txt' perché è in uso da un altro processo.
in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
in System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
in System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
in System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
in WealthLab.DataProviders.AsciiFilesStatic.AsciiFilesDataSet.Parse(String fileName)
in i.a(Object A_0, EventArgs A_1)
in System.Windows.Forms.UserControl.OnLoad(EventArgs e)
in System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
in System.Windows.Forms.Control.CreateControl()
in System.Windows.Forms.Control.ControlCollection.Add(Control value)
in WealthLabPro.NewDataSourceForm.e(Object A_0, EventArgs A_1)
in System.Windows.Forms.Control.OnClick(EventArgs e)
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assembly caricati **************
........................
How can i solve problem?
profile picture

Eugene

#2
The error message states it pretty unequivocally (in italiano): the file can not be accessed by Wealth-Lab because it's in use by another process.

I guess that "MSRT" stands for MetaServer RT, and that 3rd party software has created that text file and probably is updating it in real time? The .NET framework can not access the file locked for exclusive use.

Solution: stop real-time export and/or close MSRT so the file could be accessible by other programs.
profile picture

Flaviog2005

#3
Thanks for the reply and the patience you have with new users like me.

I had not considered that I must put the data in format
MM / dd / yy

I accidentally set
dd / MM / yy
Only by trying various historians have realized that the error arose in the place where the day pass by "12" "13"
I do not know how to do but shut the ticket
Thanks for the support
profile picture

Eugene

#4
You're right, the first post got the date format incorrect (but that isn't causing the error message - just to be on the safe side). Glad you got that sorted.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).