Click here to Skip to main content
15,888,351 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionHow to invoke a MouseEvent from a KeyBoard Event handler? Pin
manivannan.p12-Dec-04 6:27
manivannan.p12-Dec-04 6:27 
Questionhow do i create webmenu using .net Pin
karthikaprabhakar12-Dec-04 4:39
karthikaprabhakar12-Dec-04 4:39 
AnswerRe: how do i create webmenu using .net Pin
Steve Maier14-Dec-04 4:17
professionalSteve Maier14-Dec-04 4:17 
GeneralChanging datasource of a datagrid in runtime with allowpaging property = true Pin
Eng Nashwa10-Dec-04 22:30
Eng Nashwa10-Dec-04 22:30 
GeneralRetrieving Icons Embedded in Assemblies Pin
bneacetp10-Dec-04 9:22
bneacetp10-Dec-04 9:22 
GeneralRe: Retrieving Icons Embedded in Assemblies Pin
The Man from U.N.C.L.E.14-Dec-04 4:57
The Man from U.N.C.L.E.14-Dec-04 4:57 
GeneralRe: Retrieving Icons Embedded in Assemblies Pin
bneacetp17-Dec-04 9:00
bneacetp17-Dec-04 9:00 
GeneralRemoting problem in VB.net Pin
Chris Quick7-Dec-04 12:15
Chris Quick7-Dec-04 12:15 
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

        Return Data
    End Function
#End Region
End Class


Interface ILists --------

Public Interface ILists
    Function GetAffiliations() As DataSet
    Function UpdateAffiliations(ByVal Data As DataSet) As DataSet
End Interface


I am able to register the service and get things going with remoting, but
when I attempt to access any method I get the error message "Attempted to
call a method declared on type ILists on an object which exposes
ListItemServer"
. The dataset is serializable, correct? I'm clueless, so any help would be greatly appreciated! I am registering the server as a singleton and attempting to call it like this:
Dim Server as ILists = Activator.GetObject(GetType(ILists),URI)
Dim Data as DataSet
Data = Server.GetAffiliations()


Thanks!
GeneralC#.net using WMP Pin
The Animator7-Dec-04 3:17
The Animator7-Dec-04 3:17 
GeneralPackaging Issues Pin
Member 15020566-Dec-04 13:59
Member 15020566-Dec-04 13:59 
GeneralRe: Packaging Issues Pin
Colin Angus Mackay6-Dec-04 14:05
Colin Angus Mackay6-Dec-04 14:05 
GeneralRe: Packaging Issues Pin
Member 15020566-Dec-04 16:23
Member 15020566-Dec-04 16:23 
GeneralRe: Packaging Issues Pin
Colin Angus Mackay6-Dec-04 22:00
Colin Angus Mackay6-Dec-04 22:00 
GeneralRe: Packaging Issues Pin
Member 15020567-Dec-04 1:01
Member 15020567-Dec-04 1:01 
GeneralSound frequency calculation Pin
Mattias Åslund5-Dec-04 2:45
Mattias Åslund5-Dec-04 2:45 
GeneralRe: Sound frequency calculation Pin
tom_dx5-Dec-04 15:11
tom_dx5-Dec-04 15:11 
GeneralRe: Sound frequency calculation Pin
Mattias Åslund10-Dec-04 7:03
Mattias Åslund10-Dec-04 7:03 
GeneralRe: Sound frequency calculation Pin
Mike Dimmick10-Dec-04 12:47
Mike Dimmick10-Dec-04 12:47 
Generalnet send HELP!! Pin
Kevinh77773-Dec-04 15:58
Kevinh77773-Dec-04 15:58 
General.net problem Pin
tom_dx3-Dec-04 14:03
tom_dx3-Dec-04 14:03 
GeneralRe: .net problem Pin
Florent Geffroy9-Dec-04 0:04
Florent Geffroy9-Dec-04 0:04 
GeneralHTTPHandler to create & write files Pin
shefali_sinha3-Dec-04 11:37
shefali_sinha3-Dec-04 11:37 
GeneralWebService.NET Pin
Anonymous3-Dec-04 6:27
Anonymous3-Dec-04 6:27 
GeneralRe: WebService.NET Pin
Dave Kreskowiak3-Dec-04 7:05
mveDave Kreskowiak3-Dec-04 7:05 
GeneralAdding Custom Options Tab in Ms Word using Add-Ins Pin
! - - < NEO > - - !2-Dec-04 20:04
suss! - - < NEO > - - !2-Dec-04 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.