|
Your right in saying only one level is needed, the inner loop was only added after i initially had problems. This works fine for all controls on the controlList passed in, but when it calls its self when it finds a control with child controls i get an error casting from the child controls to a control list even though they appear to be of the same type. Any ideas on why the cast fails would be appreciated.
|
|
|
|
|
Hi Developers
I'm looking for an Open Source Invoice Management System, which I can modify easily according to my needs....
Please let me know if you know about any good resource about it. Thanks
|
|
|
|
|
|
Respected Dave
I googled first and then I posted here for help, anyways thanks for your HELP
|
|
|
|
|
Hi,
I'm building an app that will heavily use XML for inserting,searching,replacing,deleting...
I have solved most of the mechanics, but I didn't see a huge bug in my idea.
I need to insert xmlNodes or xml Elements in specified places in the file. Currently i'm using :
xmlNode = xmldocument.createElement("Element1")
xmlNode.setAttributes("Att1",Val1)
xmlDocument.documentElement.firstChild.FirstChild.appendChild(xmlNode)
etc...
The huge flaw of this is of course, as the file changes so the positions of many elements change so firstchild.firstchild becomes a totally different element over time as I do work on the file. So it is somewhere else like : childNodes(12).appendChild...
My question is: Is there a way to insert files using XPath or something like that where I could specifiy the name of the element or the relative path to it. like
xmlDocument.appendChild("//Category/System/[@ID=5]/SubRoutines/[@level=3]
something like that, well you get the idea.
Thanks a lot!
|
|
|
|
|
So you're looking to control the order of the children that show up under a node in the tree?? You can't control that. XML doesn't make any distictions about the order of child nodes common to one parent. Only that parent nodes must come before children.
You'd have to load all the current children into a collection, remove them from the XML document, then add them back to the parent node in the order you want them to appear.
|
|
|
|
|
I'm not sure if this is exactly what you are looking for, but I use an object of type System.Xml.XmlNodeList to reference xml nodes (I use VS2005, not sure if it's in other versions). The GetElementsByTagName will return a NodeList with all of the nodes that match the name. For example, this bit of code will set the variable strValue to the value of the first element in the file named "Element1":
Dim xDoc As New System.Xml.XmlDocument<br />
xDoc.Load("C:\MyFile.xml")<br />
<br />
Dim strValue as String = String.Empty<br />
<br />
Dim xList As System.Xml.XmlNodeList<br />
xList = xDoc.GetElementsByTagName("Element1")<br />
<br />
If xList.Count > 0 Then<br />
strValue = xList.Item(0).InnerText<br />
End If
Hope this at least helps point you in the right direction.
|
|
|
|
|
You could try to add a key attribute to the nodes that have to be sorted. Then write a class that implements IList and keeps its elements sorted after adding. That way you cannot sort the nodes in the xml file but have them sorted in your program. On the other hand, if you add another function that returns a sorted XmlNodeList you can insert the result of that in your XmlDocument and have a sorted list of childnodes in your file.
|
|
|
|
|
Hi Folks
I have this basic code.
Dim db As New MyLinqDataContext
Dim o As New Order
o.OrderName = "Cool Order"
db.Orders.InsertOnSubmit(o)
db.SubmitChanges()
db.Connection.Close()
(I originally have tried this on C#)
I have an orderid column which serves as a primary key which should update automatically when i insert the record.
When the code runs there is no record but the database is not updated. Anyone else having issues with this. Im using the express versions of visual studio 2008. thx in advance.
|
|
|
|
|
I am not very sure about this....
Is ur Database have auto commit option??? If not commit the transaction first
Good Luck
|
|
|
|
|
Hi all,
I want to save a webpage that contains tables into an excel file
using VB or VB.Net
thanks in advance
Priya
|
|
|
|
|
What's the question?? What part of this are you having problems with??
You can't save the table directly to Excel. You have to parse it out of the HTML data and put it into the cells you want, one cell at a time.
|
|
|
|
|
Hello every one
I have a Vb 2005 Express application.
I am using a label over a picture box (it has a scroll bar).
I want to have the background color of the label as transparent so that whenever the picture box is scrolled in the background of the label, every thing can be seen
But when I do this the back color of the label is of the color it first gets..
What should be done??
|
|
|
|
|
A Transparent background is NOT transparent. You cannot see the other controls on a form through a transparent background. Transparent means that the label control will use the background color or image properties of the parent form. If the background of the parent form is yellow, you're label's background will be yellow.
You'll have to create your own version of the label control, providing the painting code to create the effect you want. You can find an example of such here[^], or here[^], or the entire list of Yahoo search results for ".net transparent label control[^]".
|
|
|
|
|
hi guys
i have installed framework 2 on my system but there was framework 1 already installed,
now i am facing a problem that in control panel, admin tools, framework2 configuration icon is not seen , it is only previously installed framework 1 configuration, why is that ?
thanks in advance
hello
|
|
|
|
|
That's because, starting with .NET 2.0, the security tools have been moved to the .NET Framework SDK. They don't ship with the redistributable version.
Read here...[^]
|
|
|
|
|
so how do we configure framework 2.0 security except using caspol ?
thanks in advance
hello
|
|
|
|
|
You didn't actually read the link I posted, did you? Perhaps followed the links on that page to the place where you can probably download the SDK version and grab the security tools from it, maybe...
|
|
|
|
|
Hi all,
I have created a COM wrapper component in c#.net. I generated .tlb file out of it. Also I added reference to tlb file in VB 6.0 application and can able to call functions of COM wrapper.
In C#, i have declared a stringcollection to collect all the errors.But while mapping,this String collection is converted to Unknown in VB 6.0 and becoz of that i got mismatch error.
so i changed the stringcollection to Arraylist in C#.
This Arraylist is converted to String in VB 6.0 while mapping.
and i got error while i tried to retrive the string.
Plz give me suggestions on how to call a Stringcollection/arraylist in VB 6.0.
Thanks in Advance,
cheers
sangeet
|
|
|
|
|
You cannot pass any System.Collection objects back to VB6. You'll have to convert this collection to an array of strings to send it back to VB6.
|
|
|
|
|
I can abke to write data from Dataset to XML File but the problem now i am facing is... i am getting the XML file like this
- <NewDataSet>
- <PatientID>
<patientRegId>NH0000412006</patientRegId>
<pat_name>SNI dsen dev1</pat_name>
<DOB>1980-06-22T00:00:00+05:30</DOB>
<gender>Male</gender>
<MaritalStatus>Married</MaritalStatus>
<Religion>Christian</Religion>
<presentAddress />
<city>Chennai</city>
<presentPIN>500013</presentPIN>
<Nationaity>Indian</Nationaity>
<patientRegId1>NH0000412006</patientRegId1>
<episodeNo>1</episodeNo>
<visitNo>2</visitNo>
<consultantId>5</consultantId>
</PatientID>
</NewDataSet>
but i want the same data in this format
<NewDataSet>
- <PatientID>
<patientRegId>NH0000412006</patientRegId>
<pat_name>SNI dsen dev1</pat_name>
<DOB>1980-06-22T00:00:00+05:30</DOB>
<gender>Male</gender>
<MaritalStatus>Married</MaritalStatus>
<Religion>Christian</Religion>
<presentAddress />
<city>Chennai</city>
<presentPIN>500013</presentPIN>
<Nationaity>Indian</Nationaity>
<patientRegId1>NH0000412006</patientRegId1>
- <episodeNo No="1">
<visitNo>2</visitNo>
<consultantId>5</consultantId>
</episodeNo>
</PatientID>
</NewDataSet>
this is my code
Dim SqlDataAdapter2 As New SqlDataAdapter(qry, sqlCon)
Dim ds As New DataSet
SqlDataAdapter2.Fill(ds, "PatientID")
ds.WriteXml("E:\\ss.xml")
Thanks in Advance
modified on Thursday, January 03, 2008 2:29:20 AM
|
|
|
|
|
What are the differences?
|
|
|
|
|
I need to crete child Nodes
|
|
|
|
|
I am guessing that you have more than one episode per patient and more than one visit per episode. You can always write your own filter to create the XmlDocument you need by iterating through the rows and adding the appropriate nodes to the XmlDocument. Then you can call the Write() method of the XmlDocument.
Volker Weichert
|
|
|
|
|
Yes you are right... but i dont know how to write node by node using Dataset.. pelase can u help me
|
|
|
|