Don't know what is wrong
Don't know what is wrong
Don't know what is wrong
Don't know what is wrong
Don't know what is wrong
Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong
Don't know what is wrong Don't know what is wrong
Don't know what is wrong
Go Back  Xtreme Visual Basic Talk > > > Don't know what is wrong


Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2017, 01:01 AM
SwsCheez SwsCheez is offline
Newcomer
 
Join Date: Oct 2012
Posts: 13
Default 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
__________________
I'll procrastinate tomorrow
Reply With Quote
  #2  
Old 10-23-2017, 04:43 PM
SwsCheez SwsCheez is offline
Newcomer
 
Join Date: Oct 2012
Posts: 13
Default Wow, no takers?

Nobody wants to attempt some help on this one?
__________________
I'll procrastinate tomorrow
Reply With Quote
  #3  
Old 10-24-2017, 03:26 AM
Flyguy's Avatar
FlyguyDon't know what is wrong Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,164
Default

Move over to VBForums - Visual Basic and VB .NET Discussions and More!, this side is almost dead
Reply With Quote
  #4  
Old 10-24-2017, 10:47 AM
SwsCheez SwsCheez is offline
Newcomer
 
Join Date: Oct 2012
Posts: 13
Default

Thank you very much... Just signed up for new account
__________________
I'll procrastinate tomorrow
Reply With Quote
Reply

Tags
imports, dim, business, spath, xml, intptr, status, source=sales, greatly, stacktrace, wparam, eventargs, sender, msg, object, occurred, error, textbox10.text, hresult=0x80004003, message=object, int32, instance, set, reference, appreciated


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Don't know what is wrong
Don't know what is wrong
Don't know what is wrong Don't know what is wrong
Don't know what is wrong
Don't know what is wrong
Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong Don't know what is wrong
Don't know what is wrong
Don't know what is wrong
 
Don't know what is wrong
Don't know what is wrong
 
-->