Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 37027

Forum Post: NullReferenceException was unhandled

$
0
0
I just took the Business Object Interface class and I copied from the class document in Visual Basic and I am getting an NullReferenceException was unhandled error message. The following is my code: Hello Rob,   I am trying to do a simple VB program to show the pathSystem and I keep getting an error that displays: An unhandled exception of type 'System.NullReferenceException' occurred in Microsoft.VisualBasic.dll Public Class Form1     Inherits System.Windows.Forms. Form     Dim oScript As Object     Dim oSS As Object     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e _                            As System. EventArgs ) Handles MyBase .Load         oScript = CreateObject("ProvideX.Script")         oScript.Init( "D:\Sage\Sage 100 Premium ERP\MAS90\Home" )         oSS = oScript.NewObject( "SY_Session" )     End Sub       Private Sub Button1_Click(sender As Object , e As EventArgs ) Handles Button1.Click         MessageBox .Show(oSS.sPathSystem)     End Sub End Class   Any ideas on what could cause this?   Mike

Viewing all articles
Browse latest Browse all 37027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>