Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Remoting problem in VB.net

Remoting problem in VB.net

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharphelpquestionannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Quick
    wrote on last edited by
    #1

    I have a program that I need to figure out what is going on. First, the code: Class ListItemServer ---

    Imports System.Data
    Imports system.Data.SqlClient

    Public Class ListItemServer
    Inherits MarshalByRefObject
    Implements ILists
    Private mSQL As SqlConnection
    Private mDA As SqlDataAdapter

    Public Sub New()
        mSQL = New SqlConnection(Config.GetConnectionString)
        mDA = New SqlDataAdapter
    End Sub
    

    #Region " Affiliation Types "
    Public Function GetAffiliations() As System.Data.DataSet &_
    Implements ILists.GetAffiliations
    Dim SelectCommand As New &_
    SqlClient.SqlCommand("tff_GetAffiliations", mSQL)
    mDA.SelectCommand = SelectCommand
    mDA.SelectCommand.CommandType = CommandType.StoredProcedure

        Dim Data As New DataSet("AffiliationTypes")
        mDA.Fill(Data)
    
        Return Data
    End Function
    
    Public Function UpdateAffiliations(ByVal Data As System.Data.DataSet) As DataSet  &\_
           Implements ILists.UpdateAffiliations
        Dim SelectCommand As New &\_
            SqlClient.SqlCommand("tff\_GetAffiliations", mSQL)
        Dim InsertCommand As New &\_
            SqlClient.SqlCommand("tff\_AddAffilation", mSQL)
        Dim UpdateCommand As New &\_
            SqlClient.SqlCommand("tff\_UpdateAffiliation", mSQL)
        Dim DeleteCommand As New &\_
            SqlClient.SqlCommand("tff\_DeleteAffiliation", mSQL)
    
        SelectCommand.CommandType = CommandType.StoredProcedure
        InsertCommand.CommandType = CommandType.StoredProcedure
        UpdateCommand.CommandType = CommandType.StoredProcedure
        DeleteCommand.CommandType = CommandType.StoredProcedure
    
        With mDA
            .SelectCommand = SelectCommand
            .InsertCommand = InsertCommand
            .UpdateCommand = UpdateCommand
            .DeleteCommand = DeleteCommand
        End With
    
        With InsertCommand.Parameters
            ' Parameters
        End With
    
        With UpdateCommand.Parameters
            .Add("@AffiliationTypeID", SqlDbType.Int, 4, "AffiliationTypeID")
            ' Parameters
        End With
    
        With DeleteCommand.Parameters
            .Add("@AffiliationTypeID", SqlDbType.Int, 4, "AffiliationTypeID")
        End With
    
        Try
            mDA.Update(Data)
        Catch sqlex As SqlException
            Console.WriteLine(sqlex.Message)
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        End Try
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups