473,387 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

connection in xml file in vb.net windows form 2008

this my function in my windowsapplicationform

Expand|Select|Wrap|Line Numbers
  1.   Public Function getxml() As String
  2.         Dim connection As String = ""
  3.         Dim xml As New XmlDocument()
  4.         xml.Load("C:\Users\mohammad.CATS\Documents\Visual Studio 2008\Projects\ARtrnc02\ARtrnc02")
  5.         Dim xnf As XmlNode = xml.SelectSingleNode("configuration")
  6.         Dim child As XmlNodeList = xnf.ChildNodes
  7.         For Each c As XmlNode In child
  8.             If TryCast(c, XmlElement).Name = "appsetting" Then
  9.                 Dim xnl As XmlNodeList = c.ChildNodes
  10.                 For Each xns As XmlNode In xnl
  11.                     Dim xe As XmlElement = DirectCast(xns, XmlElement)
  12.                     If xe.GetAttribute("key") = "constr" Then
  13.                         connection = xe.GetAttribute("value")
  14.                     Else
  15.                         Continue For
  16.                     End If
  17.                 Next
  18.             Else
  19.                 Continue For
  20.             End If
  21.         Next
  22.         Return connection
  23.     End Function
Error : Could not find file 'C:\Users\mohammad.CATS\Documents\Visual Studio 2008\Projects\ARtrnc02\ARtrnc02\bin\Debug\XMLFile. xml'.

how can I do know pleas give coe connection xml in my vb.net eindows application 2008
Aug 14 '13 #1
0 903

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Daniel Billingsley | last post by:
The documentation on this subject seems to give you 98% of what you need to know. From various sources, I have compiled an understanding that this should work: <configuration>...
3
by: genojoe | last post by:
I am trying to use ADO in a Windows form. It works as expected from the development computer running from Visual Studio. When I copy the exe to another computer, I get an error. Can someone either...
5
by: Rob | last post by:
Hi to all. I am new to Visualbasic.net and windowz programming in general so I hope someone can help. I am trying to get info from a csv (Excell) file into a windows form. For instance I want to...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
1
by: shamaila | last post by:
my connection code is: String strConnection; strConnection = "server=localhost;User ID=sa;Password=sas;database=db"; SqlConnection conn = new...
4
by: Zhangming Su | last post by:
Hi, Any one know "How to get HttpApplication from Windows Form" by using C# on Windows 2003 server? Thank for the help!
1
by: John | last post by:
Hi I have developed a winform db app by dragging fields onto a form in vs 2008 i.e. I have not written code to open db connection myself and instead have let vs 2008 generate that code under the...
3
by: Maddy07 | last post by:
Hi!!!!!! How to store the values entered in text box to the Sql Server. And how to retrieve that................
1
by: GatorDBA | last post by:
Hey Folks, Experiencing strange problem with SQL 2005 running on Windows Server 2008. When trying to connect via named pipes or tcp, it takes 25-45 seconds for the connection to be established....
2
by: danphillips1977 | last post by:
Hopefully this hasn't been asked already - apologies if so I have a Windows Form running inside C# - built using the form designer I've built a number of methods inside the form Events which I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.