|
|
This question is an example of what every question here should be like.
You posted the problem, gave data on the situation that was relevant, and posted code showing what you had tried. You asked for assistance and you have done a follow up with your new attempt and the results along with your reaction to that result.
I wish every poster in this forum did as well. A well earned 5 and I hope your regex works. I still get headaches from them. Good luck.
If I have accidentally said something witty, smart, or correct, it is purely by mistake and I apologize for it.
|
|
|
|
|
Are you kidding? I mentioned two mistakes in his code, he fixed none of them, instead he changed the input data. And my sig (as most always telling people to use PRE tags) got completely ignored too. I wonder why I'm still replying to questions?
PS: I wish the pinning bug got finally fixed, comparing two posts is pretty hard right now.
|
|
|
|
|
Please refer to this[^] post.
|
|
|
|
|
How to read a users/group in my local machine at the same time can update and delete
users.
I am currently doing it manually and it takes a lot of time doing that.
I am developing it in c#. Local machine not windows directory using network domain.
Thanks
even link on how to that will do
Dabsukol
|
|
|
|
|
HI.
I have a small software build in Access.I need to build a new version of this software with C# interface and the DB in Access again.How to create an installer that I can use the file of DB separately???
I mean the guys who will use this software cannot have a continuously access to internet so till now they enter the data in the existing Access 2003 software and then they send this data by email to the center where the main operator merge this files to one.I need to implement the new C# software because of reporting possibilities and nice interface.But the DB data has to be the same and used the same way as before.Please every idea of best practices or solutions will be appreciated.
|
|
|
|
|
It's a simple matter of creating a connection to the access database and building your user interface. Take a look at connectionstrings.com for the syntax for the connection string.
This is not a design I would recommend as it requires too much manual intervention, however this may meet your requirements and skill level. Consider getting a professional to build this app based on sql server, CE and replication.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I agree with you that SQL is much better regarding DB.
But my users are not IT professional and I don't have any idea how to make simple for them file sending from different cities and merging all the data at the center.With Access DB they just send their Access file not bigger than 2 Mb by email and the center operator has an Access file merger software.
If you got any clues on this issue please consult me and I will use SQL with joy
|
|
|
|
|
|
Find below code for the same.
XDocument doc = XDocument.Parse("<Hello>World</Hello>", LoadOptions.PreserveWhitespace);
string host = "localhost";
int port = 1234;
IPHostEntry address = Dns.GetHostEntry(host);
IPEndPoint ipe = new IPEndPoint(address.AddressList[0], port);
using (Socket sock = new Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp))
{
sock.Connect(ipe);
using (NetworkStream sockStream = new NetworkStream(sock))
{
using (XmlReader reader = doc.CreateReader())
{
XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = new UTF8Encoding(false, true);
using (XmlWriter writer = XmlWriter.Create(sockStream, settings))
{
while (reader.Read())
{
writer.WriteNode(reader, false);
}
}
}
}
}
For more information find following links useful.
File Transfer using Socket Application in C# .NET 2.0[^]
http://social.msdn.microsoft.com/Forums/en/ncl/thread/6994d38b-5caf-47ff-a425-969651d1a292[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have an xml file that looks like this:
<root>
<element1 />
<element2 attr1="text" attr2="text">
<subelement21>
<subsubelement attr1="text" attr2="text" />
<subsubelement attr1="text" attr2="text" />
...
<subsubelement attr1="text" attr2="text" />
</subelement21>
</element2>
</root>
I am trying to read this file using a XmlReader. This is what I've tried but failed:
XmlTextReader reader = new XmlTextReader("file.xml");
while(reader.Read()) {
if (reader.NodeType == XmlNodeType.Element) {
switch (reader.Name) {
case "element1":
break;
case "element2":
reader.MoveToAttribute("attr1");
String att1 = reader.Value;
reader.MoveToAttribute("attr2");
String att2 = reader.Value;
XmlReader subreader = reader.ReadSubTree();
while(subreader.Read()) {
if(subreader.NodeType == XmlNodeType.Element) {
switch (reader.Name) {
case "subsubelement":
subreader.MoveToAttribute("attr1");
String a1 = reader.Value;
subreader.MoveToAttribute("attr2");
String a2 = reader.Value;
break;
}
}
break;
}
}
}
Here i get an exception saying that ReadSubTree() can't be called since reader is no longer at an element node, which makes sense. If I change the order and try to first read the sub tree and then the attributes of element2, i get the problem that reader is at the end element after reading the sub tree. This also makes sense, but i can't find a way to solve this.
Any ideas? I appreciate any suggestions.
Thanks
|
|
|
|
|
Read this[^] article, you will get your answer.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
hi....
I want to access CABdb database file(.dbc) in C# and read the contents of the .dbc file. So how can I achieve this in C#3.0.
Thanks in advance.
|
|
|
|
|
|
I am not sure exactly which file type you are referring to but your best approach is always to try this[^] first.
It's time for a new signature.
|
|
|
|
|
Hi,
I am making an application integrated with Microsoft Project in c#. Now ,I want to read mpp file and convert all task objects to DTOs. I created DTOs same as Task object. The application should read any Microsoft Project version (from MS 2003). I used the normal methods creating the ApplicationClass object, reading the Project object, then iterating the tasks etc. Found it is too slow and OS dependent. I cant quit the Winproject.exe from my application in Win 2003 server. Also the application doesn't works on 64 bit OS.
Please guide me to a solution. Hoping a reply...
I had already posted this thread one month before. But didnt get any answer.
Regards,
DJ
|
|
|
|
|
|
Does anybody know what the equivalent C# code is for this C++ code :-
this->label1->Text = Convert::ToString( nums[1] );
|
|
|
|
|
this.label1.Text = nums[1].ToString();
modified on Monday, July 19, 2010 12:23 AM
|
|
|
|
|
To get identical behavior you should also use the Convert.String method in the converted code since that's just a framework call and not syntax:
<pre>this.label1.Text = Convert.ToString( nums[1] );</pre>
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
I want to draw polyline and smooth it. I use a WPF technology. How can I solve this problem. We hope to receive assistance.
|
|
|
|
|
This is actially not the best forum to get WPF related answers.
Next time, use the WPF forum.
To draw polygons in WPF, see here[^].
|
|
|
|
|
Thanks for your help. But maybe that's not what I need. I want to draw a Polyline when the mouse moves over a canvas. Add Point when the mouse is moved, the connecting point with the Linesegment together, and add the LineSegment to Pathgeometry. Then use Drawingcontex.DrawGeometry to draw. But polyline obtained not smooth as expected and when the mouse is moved quickly add points to the Polyline very far apart. I can not solve this problem. Hope to get help. Thanks a lot
|
|
|
|
|
I have a created a database by the name of ABC. I want to copy the employees table from the northwind database to my database. Whats the best way to do it.
Can someone direct me to a useful link or let me know how to do it dynamically.
|
|
|
|
|
Use SQL Server Management Studio SSMS.
SQL 2008 (earlier are similar)
Click on the database (ABC)
select tasks
select import data
follow the wizard
Never underestimate the power of human stupidity
RAH
|
|
|
|