Thx guys for your replys. I went with the solution of cutting the objects into chuncks ;)
Kit Fisto
Posts
-
BinaryFormatter - Serialize OutOfMemory Exception -
BinaryFormatter - Serialize OutOfMemory ExceptionHello guys, I'm having a problem and, although I understand the problem, I can't find a solution to the problem. I'm using NamedPipes and I have created this method to Serialise on object T to a byte[].
private byte\[\] Serialize(T obj) { using (var memoryStream = new MemoryStream()) { oBinaryFormatter.Serialize(memoryStream, obj); return memoryStream.ToArray(); } }
I have a test that sends a object with 300Mb and the Serialization fails with a OutOfmemory.
oBinaryFormatter.Serialize(memoryStream, 300MbObject);
I understand that the problem is related to memory. Can you guys suggest another solution for this problem? Thanks Guys :)
-
C++ ofstream System.AccessViolationOk guys, For future notice, the problem was related to the configuration of the project. When I converted the project from .net 3.5 to .net 4 and from x32 to x64 something didn't quite go right. So I reverted everything back and converted again in a more controlled environment and now i can open/write/close files without a problem. Cya
-
C++ ofstream System.AccessViolationHello, It's a typo ;P I'm going to remove it. Thanks :)
-
C++ ofstream System.AccessViolationHello guys, I have a problem. I'm writing to a log file, but when I do the application throws:
An unhandled exception of type 'System.AccessViolationException' occurred in ****
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
The code (unmanaged) I'm using is this one:
inline bool writeLog(nsCLog::eSeverity severity, string message)
{
ofstream myfile;if( ((int)severity) >= mLogLevel) { myfile.open(mStrSource.c\_str(), ios::in | ios::out | ios::app); if(!myfile.is\_open()) { throw "Unable to open the file: " + mStrSource; } myfile << "TESTE" << endl; myfile.close(); } } return true;
};
When receiving this error, the code points to the _Lock() of file fstream:
virtual void __CLR_OR_THIS_CALL _Lock()
{ // lock file instead of stream buffer
if (_Myfile)
_CSTD _lock_file(_Myfile);
}Other info: Developed under VS2010 (Incially the project was Winx32 but now it's Winx64) (.NET Framework 4). The open() method of ofstream creates the file and the file is writable but throws the exception when try's to write on the file. Thank you guys in advanced.
-
Oracle.DataAccess x32 in a Machine x64Indeed. I had to install the 64-bit Oracle client. Now I'm trying to config the application to use 64-bit or 32-bit Oracle client according to the processor type using the configuration in the app.config:
Thanks for your help Dave.
-
Oracle.DataAccess x32 in a Machine x64Hello Guys. I have a problem. I have a windows service compiled with various dll's and it includes a project in C++ that contains a reference to Oracle.DataAccess. The server where that service was installed now has Windows Server 2008 R2 x64. When I try to install the service i get a error in the C++ project. I compiled the project for x64 and now it installs perfectly but when i try to use it i have a BadImage error refering to the Oracle.DataAccess. I understand that the problem is because the Oracle.DataAccess is x32, but since i can't install oracle x64 in that machine is there anything I can do to make my c++ project run as x64 using the Oracle.DataAccess x32 in the Windows Server x64? Thanks in advance guys.
-
Call Sp inside a SP and count the number of rows returned by the SPThanks man. Thats exactly what i was looking for.
-
Call Sp inside a SP and count the number of rows returned by the SPHi guys. I have a problem. I need to call a Stored Procedure inside a Stored Procedure and count the number of rows returned by the second SP. Something like this: COUNT(EXEC My_SP 1,1,1,1). That second SP returns a query with a x number or rows. Thanks in advance guys.
-
DataBinding between a DataTable and a TextBoxThanks to the both of you. Although i'm using .net 2.0 the answer from Henry Minute was correct for that i thank you. The asnwer from KMAROIS was exactly what i was looking for. Thanks :thumbsup:
-
DataBinding between a DataTable and a TextBoxHello. I have a question that i would like to ask all the codeproject members. I have this cenario: TextBox.DataBindings.Add("Text", DataTable, "Field", false, DataSourceUpdateMode.OnPropertyChanged) A textbox is binded to a DataTable field. When i change the text on the textbox the cell from the datatable receives the new value, but the RowState of the current row doesn't changes to Modified, it keeps the Unchanged state. Only when i change to another row in the DataTable (the DataTable is binded to a DataGrdiView) that the RowState of that row is changed to Modified. The problem is that when i have only one row and the user saves the information, i use a batch update to save the changes in the DataTable, but as the row keeps the Unchanged State is doesn't gets to the update. Is there any way to solve this? Thanks in advance.
-
XML WebServiceThanks Man. You helped me alot. You solved my problem. :)
-
XML WebServiceYes i know how to build webservices but it's the first time i have to build one that has a method that returns xml. It's the first time I will write/read XML programatically, so any help or guidance will be appreciated.
-
XML WebServiceHello. I need your help. I have to build a web service that returns a xml with some data from a SQL Data Base. Witch is the best and more effective way of accomplish that? Thanks all.
-
Events in ASP.NET PageCool i understood that thanks, but what about raise events in the client side? I don't want a postback to happen, I wish only to execute an action on the client-side when a textBox is changed. By the way, the textbox is in a FormView, within a UpdatePanel, on a page that has a MasterPage.
-
Events in ASP.NET PageI have already done that reasonable step before i post my question here LOL. But i couldn't understand so i decided to ask you guys because i think that codeproject is one of the best sources of programming ideas and knowledge.
-
Events in ASP.NET PageHi everyone. I'm building a web portal and i have a question. I want to add the content of two TextBoxes in one page and show the result in another textbox, but i don't want the textchange event to make postback because the page has a lot of controls and data. I think i have to make a javascript function for that but i dont know how to raise the events on the client side and i dont know how to pass the controls into the the javascript function so that i can some the values. Thanks programing brothers. :-D
-
Winforms Security SystemI thank you again my friend. Good programming.
-
Winforms Security SystemIsn't this for ASP.NET? I'm developing a winforms application can i still use this? Thanks for your reply :)
-
Winforms Security SystemHello everyone. I'm building a forms application and i want to build a security system but i don't know where to start. I have divided my application in modules and i have a login form. But want to build something like windows: Users can see somethings and can press some button but in other plases he cannot. Could some one give some lights so i can guide myself. I would like to build it myself but if you could point out some 3rd party product in last resourt lol. Thanks in advance CodeProject gurus lol.