|
You are welcome
|
|
|
|
|
SQL Server Express is free too, I use it for a few things.
Given that the out-the-door price is the same (free), the cost difference would be in:
1) maintenance -- Microsoft maintains it, perhaps more rigorously than a bunch of guys in their free time
2) support -- Millions of SQL Server users, many of them here on Code Project; go to the database forum, nearly all the questions are about SQL server, and most of the answers assume SQL Server
3) eventual migration to SQL Server when you realize you need something better -- you're already there
|
|
|
|
|
Hi,
I am processing a large xml file which is about 90MB as follows:
The problem is that every time I process this file, my machine really slows down even after I have completed my work and close the application.
I wonder if I should close the doc after usage?
Any suggestions please?
//xml file path refers to the location of the .xml file...
xmlDocument doc = new XmlDocument();
doc.load(xmlFilePath)
//processing on the file happens here...
|
|
|
|
|
The XmlDocument class has to load the whole document into memory to process it. For a large document you would be better off using an XmlReader[^]. This accesses the file as a stream, bit at a time, and allows you to move through it node by node.
(That said, your PC shouldn't slow down after you've closed the app. Have you got a separate thread or something that is keeping your app alive and not letting it close properly? There is no need to close/dispose of an XmlDocuemnt - Although you must remember to close an XmlReader if you switch to using that)
Simon
|
|
|
|
|
arkiboys wrote: I have completed my work and close the application.
Have you checked in the task manager to see if that application is still running after closing? I think you have some active threads which is keeping the application alive. If you use a separate thread to do this processing, consider making it as background thread so that it ends when the main thread ends.
Also as Simon said, XMLReader will be obvious here.
|
|
|
|
|
Yes, I have checked the task manager and noting seems to be running heavily...
Thanks
|
|
|
|
|
Hi,
I have a requirement that, need to create mail box programmatically using C#, It should run in both Exchange server 2003 and Exchange Server 2007.
I have try to create mailbox using CDOEXM, but this won’t support in Exchange Server 2007. Can anyone help me on this.
Ta
Yoons
|
|
|
|
|
How to compile a csproj dynamically.
I checked CompileAssemblyFromFile method in Microsoft.CSharp.CSharpCodeProvider but it accepts only cs files.
Thanks in advance
|
|
|
|
|
csproj files are xml scripts that are executed using msbuild.exe. the MsBuild engine can be invoked from code using the Microsoft.Build.BuildEngine.Engine[^] class.
Create the engine, set any properties you want to specify, and call BuildProjectFile()
Simon
|
|
|
|
|
Hi Simon, you are the man.....it is what exactly i wanted....thank you very much.....
|
|
|
|
|
No problem.
Simon
|
|
|
|
|
Hi,
When i try to connect diffrent ip addres the following exception are comming.
"Cannot block a call on this socket while an earlier asynchronous call is in progress.at System.Net.Sockets.Socket.ValidateBlockingMode()"
If i use same system, so the ip is same, its working properly. also in some diffrent systems connection is ok.
When i debug i get the LocalEndPoint = 0.0.0.0 : "port numbet".
Following are the code for connecting with listening server
m_sock = new Socket( AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp );
IPEndPoint epServer = new IPEndPoint( IPAddress.Parse( "listening server IP address" ), 399 );
m_sock.Blocking = true;
onconnect = new AsyncCallback( OnConnect );
m_sock.BeginConnect( epServer, onconnect, m_sock );
How can i rectify this?
Regards,
Yesuprakash
modified on Wednesday, December 17, 2008 3:00 AM
|
|
|
|
|
i've a form and when it loads it creates a new thread, with in that thread it creates another new thread , while in being in this thread i want to add a list view to the form, any suggestions ?
i tried
this.Container.Add(new ListView(),"lstvw");
lstvw.Items.Add(lst);
but the listview is not displayed on the form ;
|
|
|
|
|
You need to use Invoke/BeginInvoke. Let the main thread which hosts the UI create the control.
|
|
|
|
|
|
Ok, suppose I have the following line:
xxxxxxxx Here: #1111# xxxxxxxxxxx Here: #2222# xxxxxxxxxxx Here: #3333# xxxxxxxxxxx
How do I extract the value 2222 or 3333 alone
Please help
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
With a regex, or with the string.split, or even substring methods. It really depends on what possible values you expect to find, that is, if the 2222 is always 4 digits, always at the same position, always surrounded by #, if there's any other #, etc.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian, me too, but I'm looking for another way to do it like Regex
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Use:
using System.Text.RegularExpressions.RegEx;
RegEx finder = new RegEx("( Here: #(?<Number>\\d+)#) ", RegExOptions.ExplicitCapture);
foreach(Match match in finder.Matches("xxxxx Here: #1111# Xxxxxxxx Here: #2222# xxxxx"))
{
string number = match.Groups["Number"].Value;
}
To code, or not: Too code!
|
|
|
|
|
Hey,
Thanks, actually, I wanted to mention RegEx in my question but I wasn't sure I needed it in my case, can you tell me though how to reference the library in full cuz I can only get System.Text.RegularExpressions but not the .RegEx it doesnt branch anymore from that, besides, can you kindly link me to a good tutorial/reference to using RegEx.
Thanks mate!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
If you use the RegularExpressions namespace, RegEx is a class with static methods which he is calling.
The O'Reilly book 'mastering regular expressions' is the best resource available on the topic.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: O'Reilly book...
Hmmm, I should get one today, thanks Christian!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Still cant get it , I tried to play around with it but I screwed it..
Listen, I'm sorry but can you get me ip address alone out of the following??
Received: from [82.114.186.143] xxxxxxxxxxxxxxxx
Thanks again mate!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Well, I don't know much at all about Regex, but it seems to me that you'd try to find out if there's a way to say "give me everything between the brackets". There must be a wildcard character that does this. The example provided earlier that shows how to get everything between the '#' characters would give you a stepping off point.
Be a programmer, and work it out.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
i have added an Enum as a property in a class then attach that class to PropertyGrid. It shows a combobox in PG but problem is that whenever i select any item from that combobox, its text keep blank. I used a TypeConverter for that class. Anybody know how to solve this ?
here is code
class ProperyConverter : TypeConverter
{
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context,
object value, Attribute[] filter)
{
return TypeDescriptor.GetProperties(value, filter);
}
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return true;
}
}
[TypeConverter(typeof(ProperyConverter))]
class ABC
{
object[] data;
public ABC(object[] data)
{
this.data = data;
}
public override string ToString()
{
return data[0].ToString();
}
public MYEnum AAA
{
get { return (MYEnum)Convert.ToInt32(this.ToString()[0]); }
set { setValue(0, ((int)value).ToString()); }
}
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|