|
Hello,
I want to send log-data to a client over TCP/IP and UDP. As data format I think the best way is to use XML. Now I search a possibilty to make a well formed Xml file from the data. I have found some solutions with External entities. But here I have the problem that I have an live stream and I don't want to make allways a new file of the stream.
What is the best solution to do this?
It would be great If in the future I have the possibilty to open the log-server with an internet explorer...may be someone can give me some hints...
Best regards
Hansjörg
|
|
|
|
|
Wrap the input XML with a 'psuedo' root element, and use XML deserialization. I have done this quite successfully a few years back implementing a Jabber client on .NET.
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
How I can provide a pseudo root element?
|
|
|
|
|
imagine a situation while person A running the application if person B update the database how person A get to know about the updated inlformation with out refreshing the db connection.
|
|
|
|
|
There's really no easy way to do this. This is known as Stale Data. At some point, a connection to the database is going to exist to get this data out.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
One solution is to have person B post on a forum that the value is updated so person A knows to refresh the data. Unfortunately he post it with a meaningless subject, so no one reads it.
|
|
|
|
|
try to use sensible subjects for yours posts
In VS2005 you can write C# code in your stored procs. This could be used to broad cast a change, if you had to do it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
could you plz point out the stored proc.. because i want to do this with out worring how difficult it is..
|
|
|
|
|
prasadbuddhika wrote: because i want to do this with out worring how difficult it is..
|
|
|
|
|
I've never used .NET code in a proc, because I've never needed to. Either way, if you want to always write stuff without 'worrying about how difficult it is', it seems you've chosen the wrong profession.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
prasadbuddhika wrote: could you plz point out the stored proc.. because i want to do this with out worring how difficult it is..
What? Notifications (of whatever description) are a complex area that requires a fairly high level of knowledge. This would indicate that you need to have a deep understanding of what you are trying to do and how the solution works before you even attempt it. You cannot approach this with anything other than respect for the difficulty.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i want to show a pop up msg through my application when the application detect that the database has got updated relevent to the a particular client .how can i perform this task?
|
|
|
|
|
What king of message or popup?
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
something like a form which pop up from the notification area
|
|
|
|
|
You need to take a look at something like SQL Notification Services/SQLDependency. This is a very complex topic so it's beyond the scope of a forum answer to detail how this works.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
This is way more complex to do than for example writing a subject on a forum post. As you clearly do not have the faintest idea about how to write such a subject line, I recommend you simply give up learning to program for now.
Once you have mastered writign a subject, feel free to start posting again.
|
|
|
|
|
Hello,
I have a treeview control in one form, and another empty form with a panel on it. On the first form with the treeview, I can select multiple nodes. But now I want to drag'ndrop the selected nodes.
I use this:
// FIRST FORM WITH TREEVIEW
<br />
void boom_MouseMove(object sender, MouseEventArgs e)<br />
{<br />
if (e.Button != MouseButtons.Left) return;<br />
<br />
foreach (TreeNode n in boom.SelectedNodes)<br />
{<br />
boom.DoDragDrop(n, DragDropEffects.Move);<br />
}<br />
}<br />
So the selected Items are made dragdrop. But now I want to display the text (or something related to the node) on the second form. But when I do that, only the first node is dropped, not the rest?
// SECOND FORM
<br />
void Template_DragDrop(object sender, DragEventArgs e)<br />
{<br />
if (!e.Data.GetDataPresent(typeof(TreeNode))) return; <br />
TreeNode node = (TreeNode)e.Data.GetData(typeof(TreeNode));<br />
MessageBox.Show(node.Text);<br />
}<br />
How can I show the multiple nodes?
Thank you at advance
|
|
|
|
|
Someone knows an answer?
Thank you
|
|
|
|
|
In the DoDragDrop call, you need to send all your data at once. I recomend adding the selected nodes (or their tags) to a list first, then send that list with a single call to DoDragDrop.
IList<TreeNode> items = new List<TreeNode>(boom.SelectedNodes);
DragDropEffects result = boom.DoDragDrop(items, DragDropEffects.Move);
if (result == DragDropEffects.Move) {
...
}
Jeff
|
|
|
|
|
i want to send a file ( pic1.jpg ) by e-mail! but without any openDilogFile for choosing file!
i know the path of file!
just C# coding for attach and send it !
any one can help me?
Imposible is Imposible...
|
|
|
|
|
Funny[^] how the first few google hits always include an article on this site.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
this is my answer!?!?!?!
Imposible is Imposible...
|
|
|
|
|
Amin Diary wrote: this is my answer!?!?!?!
Yup. We don't do your work for you. We'll help you with specific problems, but we're not here to do your job. Tell you what - give us your pay and we'll write the code for you. Seems fair.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
People who are obsessed with the rating system on this site will answer a question like this. I care more about helping people who want to learn, and the best way I can do that, is to show you how trivially you could have got far more detailed help than you'll get from a forum response, by typing some obvious keywords into google.
That I'm not trying to co-erce a 5 vote out of you doesn't mean I'm not the one who has your best interests at heart.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: That I'm not trying to co-erce a 5 vote out of you doesn't mean I'm not the one who has your best interests at heart.
Good answer. It coerced my 5.;)
Deja View - the feeling that you've seen this post before.
|
|
|
|