Hi, My requirement is to read the file one by one and update the content in database. I'm getting Out of memory Exception while reading 32Mb text file. I ve used streamReader to read the File. StreamReader strReader = new StreamReader(filePath); return strReader.ReadToEnd(); I have tried with ReadLine() also. Same error comes. Is there any solutions for this? Thanks in advance
Revathij
Posts
-
Out of Memory Exception while reading Text File -
System.AccessViolationException: Attempted to read or write protected memory.Hi, I'm getting the following error when i unlock my machine after few minutes. i have run my application before lock the machine. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Windows.Forms.SafeNativeMethods.MessageBox(HandleRef hWnd, String text, String caption, Int32 type) at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon) at SampleApplication.FormExportData.toolStripNewExport_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll I don't know the reason for this error. Any knows the reason? Thanks in advance :)
-
"Out of memory exception when loading image with bitmapI'm also having the same Problem. In my local it is working properly. But in server, it is throwing out of memory exception. i got this exception even though the memory is available in server. Graphics g = Graphics.FromImage(source); try { g.DrawImageUnscaled(original, 0, 0); } finally { ((IDisposable)g).Dispose(); } This is the code i'm using. Any solutions to this issue? Thanks in advance :)
-
Resize the Column Header in ListViewAny one know how to resize the Column header height in ListView?
-
Prolem in ColoPicker conrtolI had used UltraColorPicker control to show the color in a column in listview. But while selecting the color it is showing some relevant numbers instead of color name for few colours in Custom tab. Did i miss any settings here..... ? Any one help me.... Thanks in advance
-
Calendar ProblemHi all, I have a calendar in my page and below of it is Webgrid. When i click on the calendar, calendar is not fully visible. part of the calendar is hiding by grid. How to show the calendar fully? Thanks in advance.
-
Appending the value with NULL valuehi all, I want to append the value '123' with the value in column A. Column A is having few NULL value rows. NUll values should be replaced by the new value and others should be appended. How to do this in all rows of column A? Thanks in advance
-
Update the value with a value in the tableThanks a lot.... now my sp is working fine
-
Update the value with a value in the tablehi all, i want to update the column value with the value already in that column in a table(based on where condition) For example, table 1 -------- id name 1 abc 2 xyz Now i'm appending the value '123' with the value in the column 'name'. the result should be like id name 1 abc123 2 xyz123 How to do this......
-
How to change the column alignment in Preview of gridI have a infragistics Cardview enabled WinGrid with 2 column. First column is having the column headers and second column is having the value for the first column. I want to Preview the data in the grid. For that I've used UltraPrintPreviewDialog control (Infragistics Control). Preview is generating for the grid, But the column alignment is changing (It first displays all the data in the first column and then the data in the second column). I want preview with First column data and then second column data in each row. How to get like this..? Can any one help me pls....
-
Browser icon in address bar?How to change the browser icon in address bar?
-
Drag and Drop in treeview nodeHow to drag and drop the nodes from one treeview to another in windows application?
-
Insert characteruse Replace function for example : string str="ABC/DEF/GHI"; str=str.replace('/','-')
-
Checkbox column in a grid view...just bind data as other columns. But the Column u want to be in checkbox should be of datatype 'Bit' in database.
-
how can i set the value in textbox using ASPU can use javascript to set value
-
close butonfunction getconfirm() { return confirm('Are you sure want to delete '); } Call this function in the onclick event of corresponding button in source code.
-
Fault Exception ErrorWhile running my service i got Fault Exception Error "An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail." Any one can help me pls.....
-
Regular Expression Validatortry regular expression in this link ... http://regexlib.com/RETester.aspx?regexp_id=235[^]
-
System.Text.RegularExpressions.RegexTry Regular Expression in this link .... http://regexlib.com/RETester.aspx?regexp_id=235[^]
-
System.Text.RegularExpressions.RegexDo u need Regular Expression for this Format?