|
Hi,
I guess you have to write a routine yourself, implementing a join like sql by hand.
Regards
Sebastian
|
|
|
|
|
You can either write some XSLT to combine the two file or use Linq to XML
only two letters away from being an asset
|
|
|
|
|
How>????It is the first time i use LINQ
|
|
|
|
|
HI,
How can I get Oracle Servers names in current computer Using C#. Suppose a list of DBMSs names are appeared in a list box. When I clicked in SQL server data base then it shows all the sql server data bases in my current computer. But now I need when I will click oracl then it will display the servers names and when i click a particular server it will ask for user name and password from me. So currently my main problem is how can I get oracle server name using C#. After getting server name I will be able to do the next steps.
|
|
|
|
|
This will help you get a list of SQLservers
just include using System.Data.Sql;
DataTable ListOfServersNames=new DataTable();<br />
var sqlServers = SqlDataSourceEnumerator.Instance;<br />
ListOfServersNames= sqlServers.GetDataSources();
Now the datatable will contain the list of servernames available.
|
|
|
|
|
Hi..
I just wanted to know whether there is any way to get collection editor form
inside a another form , without using property grid, since my boss doesn't like the pop up coming up for collection editor, so without triggering any event the collection editor must be placed in a particular location of my form, which i can further edit and add items into the collection list.
Can anyone guide me how can i do this..
|
|
|
|
|
I would like to use the AxMSChart control but I can't find any documentation about how to use it. Does anyone have experiance with this?
|
|
|
|
|
|
Does it support .net 2.0 framework?
|
|
|
|
|
No, it's only for .NET 3.5
|
|
|
|
|
If your not using .NET 3.5, have a look at ZedGraph[^] instead.
|
|
|
|
|
Thanks Dave
|
|
|
|
|
I'm writing a VS add-on which, on activation, is supposed to add a couple of attributes in the App.xaml.
The problem I get is, when App.xaml is opened for editing, everything works fine.
But, if App.xaml isn't opened the changes aren't saved. I went through the code, it still goes through it like it should, it adds the attributes like it should, it even executes the line of code that's supposed to save the changes, except... changes aren't saved
This is an overview of what i do:
<br />
codeState.editPoint.StartOfDocument();<br />
string xmlText = codeState.editPoint.GetText(codeState.textDoc.EndPoint);<br />
<br />
--- add a couple of attributes using XmlDocuments<br />
--- save the changes into a memory stream<br />
<br />
codeState.editPoint.ReplaceText(codeState.textDoc.EndPoint, reader.ReadToEnd(), 0);<br />
Any ideas why?
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
|
|
|
|
|
I think, you must ask at WPF forum.
|
|
|
|
|
It's not really a WPF issue. The file just happens to be xaml, the problem would persist no matter the file type.
I thought of asking this in the Visual Studio forum, since I am working on a Visual Studio add-on... but, that's more of a "using" forum, than programming.
Where it seems there are only borderlines, Where others turn and sigh, You shall rise!
|
|
|
|
|
rastaVnuce wrote: It's not really a WPF issue.
Nor is it a C# issue, please post to the correct forum i.e. Visual Studio.
|
|
|
|
|
hi,
how pass multiple parameter in crystal report through c#???
|
|
|
|
|
Writing your exact sentence in Google gave this link [^] as the number one hit... You should try it!
|
|
|
|
|
Try here [^]- you may find it useful in cases like this...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi all,
I am trying to make use of XElement instead of XmlWriter, but I am experiencing some hickups ...
The XmlWriter code works perfectly .. here it is:
foreach (var controller in ControllerList)
{
w.WriteStartElement("controller");
w.WriteAttributeString("name", controller.Value.ControllerName);
w.WriteAttributeString("description", controller.Value.ControllerDescription);
w.WriteAttributeString("area", controller.Value.ControllerArea);
w.WriteAttributeString("startdate", DateTimeClass.DateTimeYearMonthDay(controller.Value.StartDate));
w.WriteAttributeString("enddate", DateTimeClass.DateTimeYearMonthDay(controller.Value.EndDate));
w.WriteAttributeString("updatemode", controller.Value.UpdateMode);
foreach (var reader in controller.Value.ReaderList)
{
w.WriteStartElement("reader");
w.WriteAttributeString("name", reader.Value.ReaderName);
w.WriteAttributeString("readergroup", reader.Value.ReaderGroup);
w.WriteAttributeString("host", reader.Value.ReaderHost);
w.WriteAttributeString("type", reader.Value.ReaderType);
w.WriteAttributeString("startdate", DateTimeClass.DateTimeYearMonthDay(reader.Value.StartDate));
w.WriteAttributeString("enddate", DateTimeClass.DateTimeYearMonthDay(reader.Value.EndDate));
w.WriteAttributeString("description", reader.Value.ReaderDescription);
w.WriteEndElement();
}
w.WriteEndElement();
}
-- XmlWriter Output --
<building plant="Rosslyn" name="0.20/0.90.11.9/plant2/HQ" description="Plant2" X="206" Y="209" Width="67" Height="56">
<controller name="Za12436" description="Test Controller" area="D" startdate="20090902" enddate="99981231" updatemode="D">
<reader name="A123" readergroup="GFT" host="Za12436" type="C" startdate="20090902" enddate="99981231" description="Test reader 1" />
<reader name="A345" readergroup="DRG" host="Za12436" type="C" startdate="20090902" enddate="99981231" description="Test Reader 2" />
<reader name="A567" readergroup="HYG" host="Za12436" type="C" startdate="20090902" enddate="99981231" description="Test redscsc 3" />
</controller>
<controller name="ZA324578" description="Controller 2" area="F" startdate="20090902" enddate="99981231" updatemode="D">
<reader name="B235" readergroup="BGYT" host="ZA324578" type="C" startdate="20090902" enddate="99981231" description="JJjksjcklsljcl" />
<reader name="B658" readergroup="hjkhkk" host="ZA324578" type="C" startdate="20090902" enddate="99981231" description="khkhk" />
<reader name="B730" readergroup="GFT" host="ZA324578" type="C" startdate="20090902" enddate="99981231" description="khkhkh" />
</controller>
</building>
but the XElement code does not produce the same results .. It appends the data to the first controller node ... here is the code:
foreach (var controller in ControllerList)
{
xElement.Element("plant").Element("building").Add(new XComment(String.Format("Controller: {0} Declaration", controller.Key)));
xElement.Element("plant").Element("building").Add(new XElement("controller",
new XAttribute("name", controller.Value.ControllerName),
new XAttribute("description", controller.Value.ControllerDescription),
new XAttribute("area", controller.Value.ControllerArea),
new XAttribute("startdate", DateTimeClass.DateTimeYearMonthDay(controller.Value.StartDate)),
new XAttribute("enddate", DateTimeClass.DateTimeYearMonthDay(controller.Value.EndDate)),
new XAttribute("updatemode", controller.Value.UpdateMode)
));
foreach (var reader in controller.Value.ReaderList)
{
xElement.Element("plant").Element("building").Element("controller").Add(new XElement("reader",
new XAttribute("name", reader.Value.ReaderName),
new XAttribute("readergroup", reader.Value.ReaderGroup),
new XAttribute("host", reader.Value.ReaderHost),
new XAttribute("type", reader.Value.ReaderType),
new XAttribute("startdate", DateTimeClass.DateTimeYearMonthDay(reader.Value.StartDate)),
new XAttribute("enddate", DateTimeClass.DateTimeYearMonthDay(reader.Value.EndDate)),
new XAttribute("description", reader.Value.ReaderDescription)
));
}
}
-- xElement Output --
<building plant="Rosslyn" name="0.20/0.90.11.9/plant2/HQ" description="Plant2" X="206" Y="209" Width="67" Height="56">
<controller name="Za12436" description="Test Controller" area="D" startdate="20090902" enddate="99981231" updatemode="D">
<reader name="A123" readergroup="GFT" host="Za12436" type="C" startdate="20090902" enddate="99981231" description="Test reader 1" />
<reader name="A345" readergroup="DRG" host="Za12436" type="C" startdate="20090902" enddate="99981231" description="Test Reader 2" />
<reader name="A567" readergroup="HYG" host="Za12436" type="C" startdate="20090902" enddate="99981231" description="Test redscsc 3" />
<reader name="B235" readergroup="BGYT" host="ZA324578" type="C" startdate="20090902" enddate="99981231" description="JJjksjcklsljcl" />
<reader name="B658" readergroup="hjkhkk" host="ZA324578" type="C" startdate="20090902" enddate="99981231" description="khkhk" />
<reader name="B730" readergroup="GFT" host="ZA324578" type="C" startdate="20090902" enddate="99981231" description="khkhkh" />
</controller>
<controller name="ZA324578" description="Controller 2" area="F" startdate="20090902" enddate="99981231" updatemode="D" />
</building>
What am I doing wrong??
Many thanks in advance.
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
xElement.Element("plant").Element("building") is returning the 1st building tag in the XML. Similarly xElement.Element("plant").Element("building").Element("controller") returns the 1st controller , so all readers will be added to the first controller element in the XML.
You will be better off creating the controller element in the foreach (var controller in ControllerList) loop, adding it to the building . Adding the reader elements to the controller element you have just created inside the foreach (var reader in controller.Value.ReaderList) should fix your problem.
|
|
|
|
|
Hi Keefb,
Thanks for the response and the input.
keefb wrote: You will be better off creating the controller element in the foreach (var controller in ControllerList) loop, adding it to the building.
Makes sense ... thanks, lets see what I can do
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
No probs. You should also find that, by creating the elements in the loop, you will be able to Factor out somthing like MakeControllerElement and MakeReaderElement methods. This will help the readability / maintainability of the code (always a problem when creating classes to build XML in my experience).
|
|
|
|
|
Will keep that in mind... thanks again.
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
--- XElement Code ---
foreach (var controller in ControllerList)
{
xElement.Element("plant").Element("building").Add(new XComment(String.Format("Controller: {0} Declaration", controller.Key)));
XElement con = new XElement("controller",
new XAttribute("name", controller.Value.ControllerName),
new XAttribute("description", controller.Value.ControllerDescription),
new XAttribute("area", controller.Value.ControllerArea),
new XAttribute("startdate", DateTimeClass.DateTimeYearMonthDay(controller.Value.StartDate)),
new XAttribute("enddate", DateTimeClass.DateTimeYearMonthDay(controller.Value.EndDate)),
new XAttribute("updatemode", controller.Value.UpdateMode)
);
foreach (var reader in controller.Value.ReaderList)
{
con.Add(new XElement("reader",
new XAttribute("name", reader.Value.ReaderName),
new XAttribute("readergroup", reader.Value.ReaderGroup),
new XAttribute("host", reader.Value.ReaderHost),
new XAttribute("type", reader.Value.ReaderType),
new XAttribute("startdate", DateTimeClass.DateTimeYearMonthDay(reader.Value.StartDate)),
new XAttribute("enddate", DateTimeClass.DateTimeYearMonthDay(reader.Value.EndDate)),
new XAttribute("description", reader.Value.ReaderDescription)
));
}
xElement.Element("plant").Element("building").Add(con);
}
<br />
<br />
<div class="ForumSig"><br />
<table width="100%" align="center"><tbody><tr><td> <font color="#FF9900">The only programmers that are better C# programmers, are those who look like this -> :bob:</font></td></tr></tbody></table> <br />
<br />
<font color="#429DFF"><br />
:java: Programm3r</font><br />
My Blog: <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1917620&id=2823228#xx1917620xx">^_^</a></div>
|
|
|
|
|