By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,402 Members | 1,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,402 IT Pros & Developers. It's quick & easy.

No accessible overloaded error

P: n/a
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.se t_InternalThrow(Exception
Value)
at Microsoft.VisualBasic.CompilerServices.VBBinder.Bi ndToMethod(BindingFlags
bindingAttr, MethodBase[] match, Object[]& args, ParameterModifier[]
modifiers, CultureInfo culture, String[] names, Object& ObjState)
at Microsoft.VisualBasic.CompilerServices.VBBinder.In vokeMember(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(O bject s,
ImageClickEventArgs e) in
C:\Inetpub\wwwroot\staffingworkshop\applicant\secu re\applicationCompletedView.aspx:line
666
at System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs e)
at
System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection 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
Jul 25 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.