Anyone know how to make the client side of this small example access the server side on a different machine?? I'm guessing its something to do with the imports bit in the client side?? Help!!!
![]()
VB Code:
'BankComponent Server Imports System.EnterpriseServices Imports System.Runtime.CompilerServices Imports System.Reflection ' Supply the COM+ application name. <assembly: ApplicationName("BankComponent")> ' Supply a strong-named assembly. <assembly: AssemblyKeyFileAttribute("BankComponent.snk")> Namespace BankComponent <Transaction(TransactionOption.Required)> _ Public Class Account Inherits ServicedComponent <AutoComplete()> _ Public Sub Post(accountNum As Integer, amount As Double) ' Updates the database; no need to call SetComplete. ' Calls SetComplete automatically if no exception is generated. End Sub End Class End Namespace 'BankComponent Client Imports BankComponent Public Class Client Shared Sub Main() Dim Account As New Account() ' Post money into the account. Account.Post(5, 100) End Sub End Class


Reply With Quote
