No accessible overloaded error

T

tshad

I am getting the following error which makes no sense.

No accessible overloaded

If you look at the error, there is one overloaded function that can be
called (int, string, int, int).

The first variable is constant that should work fine as an int and works
everywhere else.
The second variable is a string.
The third variable is a System.Int32. (from trace)
The fourth variable is a System.Int64. (from trace)

The code:
******************************************************
trace.warn("type = User - " & Session("User").UserID.GetType.ToString())
trace.warn("type = ApplicantID - " &
Session("ApplicantID").GetType.ToString())
HistoryLog.WriteHistoryLog(13,"Application Filed for: " &
HeaderJobTitle.Text,Session("User").UserID,session("ApplicantID"))
************************************************************

Trace results:
**************************
type = User - System.Int32
type = ApplicantID - System.Int64
****************************

The error messages:
********************************************************
Unhandled Execution Error

No accessible overloaded 'HistoryLog.WriteHistoryLog' can be called with
these arguments without a narrowing conversion:
Public Sub WriteHistoryLog ( ByVal historyActionID As Integer, ByVal detail
As String, ByVal userID As Integer, ByVal applicantID As Integer )
Public Sub WriteHistoryLog ( ByVal historyActionID As Integer, ByVal detail
As String, ByVal firstName As String, ByVal lastName As String )
at
Microsoft.VisualBasic.CompilerServices.VBBinder.set_InternalThrow(Exception
Value)
at Microsoft.VisualBasic.CompilerServices.VBBinder.BindToMethod(BindingFlags
bindingAttr, MethodBase[] match, Object[]& args, ParameterModifier[]
modifiers, CultureInfo culture, String[] names, Object& ObjState)
at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String name,
BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object target,
Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at ASP.applicationCompletedView_aspx.SubmitIt_Click(Object s,
ImageClickEventArgs e) in
C:\Inetpub\wwwroot\staffingworkshop\applicant\secure\applicationCompletedView.aspx:line
666
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()
*******************************************************************

Here is the Function Call that is being called

Public Shared sub WriteHistoryLog (historyActionID as Integer,detail as
String,userID as Integer,applicantID as Integer)

What am I missing?

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top