Question Compilation error after hosted the website in IIS 6.0

deivanai

New member
Joined
May 21, 2013
Messages
1
Programming Experience
5-10
Hi,
When I run the application which is written in VB.net from IDE,it is working fine.But when I host the same website in IIS 6.0 I am getting the follwoing Compiler error


Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30519: Overload resolution failed because no accessible 'Add' can be called without a narrowing conversion: 'Public Function Add(name As String, dbType As System.Data.DbType, value As String) As Integer': Argument matching parameter 'dbType' narrows from 'System.TypeCode' to 'System.Data.DbType'. 'Public Function Add(name As String, dbType As System.Data.DbType, value As String) As Integer': Argument matching parameter 'value' narrows from 'Integer' to 'String'. 'Public Function Add(name As String, type As System.TypeCode, value As String) As Integer': Argument matching parameter 'value' narrows from 'Integer' to 'String'.

Source Error:



Line 63:
Line 64: AccessDB.SelectCommandType = SqlDataSourceCommandType.Text
Line 65: AccessDB.SelectParameters.Add("parID", TypeCode.String, 1)
Line 66: 'create a dataview and put the info in
Line 67: dv = CType(AccessDB

CAn anyone help me to resolve this issue
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,726
Location
Sydney, Australia
Programming Experience
10+
You are not passing the expected argument types to Add. It only has two overloads with three parameters and, in both cases, the third parameter is type String. Pass a String where a String is expected, not an Integer.
 
Top Bottom