|
Hi,
Is there any good way to handle large file (typically 2Gig)? I prefer to read block by block and upload into GUI.
How it will work out ?
|
|
|
|
|
I think that you can read it fast enough with Streamreader. But I don't know what the results will be for your memory...
If you are intending to pass this info into a database. You might wanne create a Data Transformation Service
(DTS) package for the (bulk) insert. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtsprog/dtspapps_21rn.asp
For the rest I want to suggest you, because you specified GUI, that while reading to a GUI, you don't update/redraw the GUI, because this will slow down the whole process. When passing them to a listview, the good way is:
listview1.BeginUpdate()
READ + ADD TO LISTVIEW1
listview1.EndUpdate()
Good luck, if not satisfied, please provide more details on your project.
|
|
|
|
|
If you're using a 32 bit version of windows, the maximum memory space for an application is 2gig (3 if you fiddle some system settings), so you might find you can't hold the whole file in memory
|
|
|
|
|
Dear Mr and Ms !
I am using C# 2005,
I can not input date type with format 'dd/MM/yyyy' in Datagridview control.
Please help me.
Thank so much !
Thomas
|
|
|
|
|
how to tranfer file using Filestream through sockets using UDP in c#..?
I've tried file streaming but at Recieving End i m unable to get the byte recieved in my recieving buffer as RecieveBuff.length() gives the length of buffer but not the total bytes recieved in buffer.
ForExample at rcving end length of buff is 8KB but if last sending packet is of 2KB then how Could I retriev just 2KB as it append the 6KB of garbag data into buffer.
SO PLZ HELP ME OUT ASAP.
Thanx.
Shanzay
|
|
|
|
|
I want to use connection pooling in my application.
its a multithreaded application. every thread open is querying database with different sql statement.
If i use connection pooling here will it create any problems? like giving wrong results
aparna
|
|
|
|
|
Think in Datareaders. If you use it,you open, read and time after you close it. If in this period you try to open another from other thread you will get an exception.
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
Hi - this is actually the third time you came to this site asking the same question.
It looks like you really need to post to a Crystal Reports forum not a C# forum. Have a search on google to see what you can find.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
If the OP who just deleted his post is still around - please don't delete above a thread - it messes up the forum.
I wasn't being unjust - I just didn't want you wasting your time asking the same question in the same place many times and not getting any results.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
I am not too clever, if I was, I would have answered your original question. I use what ability I have to the best of it. Always. I was simply trying to help - it is pointless posting the same question over and over.
I hope you find your answer, and if you do, write an article for Code Project on Guntt Gantt Charts in Crystal Reports for C# - thereby helping others.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
This is no different to putting urgent plz help in the title. You are not being polite to other posters by doing this because you are assuming that your post is more important than theirs. Just because it is the most important thing that you are dealing with, doesn't make it any more important or urgent than things that other people are dealing with.
This site is volunteer only. If you feel that you really need this information ASAP then you need to consider paying for a support call with Business Objects (or Crystal Reports - or whatever they are calling themselves now). That way, you can guarantee that people will take a look at your problem ASAP.
The problem that you now have is that people know that you repeat post the same issue. This meanst that people are more likely to ignore your posts because they think that they are a repeat of things that have already been posted about.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hai Every body,
Can any one tell me how to create a html file for the contents in the rich text box.
Also can you tell me how to bold the selected text of the rich text box.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Get it
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi,
I have some Static label or Some Rich Text label that i set to it in Run Time some String.
In case the string is too long ( the size of the Static label or the Rich Text label is not auto size ( i mean that the size is const ) ) there will be some Tool Tip with the all string.
My question is ... how can i know if the string is too long ?
Is there is some way ?
Thanks for any help.
|
|
|
|
|
class myClassThatHoldsTheString
{
const int _myToolTipLength = 50;
private string _myTooltip;
public string MyTooltip
{
get { return _myTooltip;}
set {
if (_myTooltip== value)
return;
if (value.Length > _myToolTipLength)
_myTooltip= value.Substring(0,myToolTipLength );
else
_myTooltip= value;
}
}
}
myControl.Tootip = myInstance.MyTooltip;
-- modified at 3:25 Wednesday 26th September, 2007
I've just re-read the OP question and think I have answered totally the wrong thing...but I am leaving it here anyway!
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
As i still dont have much programming exp., so there are some question of mine which want as answer.......
-> If i created a peice of code and its working, then i dont even think wheather it is good enough or not, i mean is there other better way?
So, how to analyse this?
(plz dont measure performance in neno-second(resources), as in small application it hardly matters)
-> How to analyse the worst case possibility of code?
|
|
|
|
|
if u r using a backend it really matters
www.codepal.co.nr
Regards
Bino
http://www.codepal.co.nr
|
|
|
|
|
Performance and properly architected code matter in all cases. Also, please use proper english and not SMS (Text) Speak in the forums and don't advertise.
|
|
|
|
|
This really depends on what you want to analyze. If you are just looking for performance measurements, you can do order analysis or wrap sections of the code in timing blocks. If you are looking for best practices type analysis, you can run tools like NDepend[^] or FxCop[^].
There are a lot of design resources available through CP, the web, or books as well that can give you good design patterns to start to follow.
|
|
|
|
|
Learn to spell 'should'
Pick out a small section of your code, a small class, or a few methods and post it here, asking people to critique it for you. Don't post your whole application though.
Whilst this is strictly a forum for answering problems regarding C#, considering the amount of dross that is being posted recently, I imagine you will get loads of people offering advice on how your code can be improved, and constructive criticism on what you have done.
If others don't agree with me, the worst you will get is a few '1' votes (and I'll get a few more for suggesting it!!)
<edit>
Unless you're from NIIT - then you're on your own! (sorry, I have a problem with NIIT students on here at the moment - hopefully one of them will prove me wrong soon.)
</edit>
-- modified at 3:36 Wednesday 26th September, 2007
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Malcolm Smart wrote: hopefully one of them will prove me wrong soon.)
I don't think that's likely to happen. They really do seem to like being the dross on the net.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I think that you need to learn to program and experience the mistakes. I learned programming with falling and standing up. Wrote brilliant code that later-on was a piece of crap caused by performance issues. Well this you learn while you are learning and doing.
How you can test if your application is doing fine, work with it.
Your application works fine with a small amount of data, what if you multiply this small amount of data by 1000?
Is my application slowing down? Do I make to much Interface call backs during the process?
Besides that, there are in the market profiling tools that can point out code that is taking to much time to run. Think of ANTS profiler and JetBrains.
|
|
|
|
|
I haven't looked too closely at your code but you'll receive a datareceived event as soon as the first byte comes in. Sounds like you're then trying to read everything that's arrived. Most of your data will still be yet to arrive.
Try reading a byte every time you get the datareceived event and then assembling them as you see fit.
This assumes you have set the serial port to send a datareceived event for every byte. If you've set it for more then read as many as you've set.
I have no blog...
|
|
|
|
|
Dudes,
Why is it that everytime i download a csv file it will include the default.aspx
result:
11,22,33,44,55,test,testA,test12,8888,42352,asdf,as12DF,20000 ->this is only what i want
--> but it always include this
...
...
...
heres my code:
string filename = "default";
Response.Clear();
Response.ContentType = "APPLICATION/CSV";
Response.AddHeader("Content-Disposition", "Attachment; Filename =" + filename + ".csv");
Response.Flush();
Response.WriteFile(Server.MapPath("~/doc/default.csv"));
Did i miss something?
Thanks in advance,
C#Coudou
******************************
I just want to
know everything
|
|
|
|
|
Hello All,
I have two tables First one has PK auto increment column and the second table Has FK I select the last inserted PK in the First table and insert it into the second table as FK. is there is any more professional way to do so or this is the correct way?
Sms
|
|
|
|