Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET File I/O and Registry (http://www.xtremevbtalk.com/-net-file-i-o-and-registry/)
-   -   Don't know what is wrong (http://www.xtremevbtalk.com/-net-file-i-o-and-registry/328812-dont-wrong.html)

SwsCheez 10-23-2017 01:01 AM

Don't know what is wrong
 
Please help! for some reason. I have used similar code to this to read an XML into textbox's but its not working now. Can someone please take a loo

Here is the XML File:

<?xml version="1.0" standalone="true"?>

-<DataSet1 xmlns="http://tempuri.org/DataSet1.xsd">


-<dtReminders>

<UserID>16</UserID>

<Date>10/14/2017</Date>

<Time>10:40 PM</Time>

<Prospect>Business 1</Prospect>

<Email>ken@gmail.com</Email>

<Reminder>Test 2</Reminder>

</dtReminders>


-<dtReminders>

<UserID>20</UserID>

<Date>10/16/2017</Date>

<Time>2:00 PM</Time>

<Prospect>Business 1</Prospect>

<Email>ken@gsnail.com</Email>

<Reminder>cvzv</Reminder>

</dtReminders>

</DataSet1>



Imports System.Xml
Imports System.Xml.XmlWriter
Imports System.Xml.XmlReader
Imports System.IO

Dim spath As String = Directory.GetCurrentDirectory
TextBox15.Text = spath

Dim xmlDoc2 As New XmlDocument()
xmlDoc2.Load(TextBox15.Text & "\Xmluserdata.xml")
Dim emnodes As XmlNodeList = xmlDoc2.DocumentElement.SelectNodes("/DataSet1")

TextBox9.Text = _ xmlDoc2.SelectSingleNode("DataSet1/dtReminders/UserID").InnerText
TextBox10.Text = _ xmlDoc2.SelectSingleNode("DataSet1/dtReminders/Date").InnerText


Here is the error: System.NullReferenceException occurred
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Sales Status
StackTrace:
at Sales_Status.Form7.Form7_Load(Object sender, EventArgs e) in C:\Users\kendi\documents\visual studio 2017\Projects\Sales Status\Sales Status\Form7.vb:line 50
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Any help would be greatly appreciated

SwsCheez 10-23-2017 04:43 PM

Wow, no takers?
 
Nobody wants to attempt some help on this one?:huh:

Flyguy 10-24-2017 03:26 AM

Move over to VBForums - Visual Basic and VB .NET Discussions and More!, this side is almost dead

SwsCheez 10-24-2017 10:47 AM

Thank you very much... Just signed up for new account


All times are GMT -6. The time now is 05:13 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.