I have just upgraded my project from vs2003 to vs2005, it has gone reletively smoothly and I have cleared all errors apart from one shown below:
[/SIZE]
The above code is to save an image in a sql database, in my vs2003 project the above code was perfectly acceptable and worked fine, however now that I have upgraded to vs2005 it is giving me the following error. Can someone please tell me how to solve this.
Thanks in advance
Simon
Error:
VB.NET:
[SIZE=2]myInsertCmd.Parameters.Add([/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] OleDb.OleDbParameter([/SIZE][SIZE=2][COLOR=#800000]"@commImage"[/COLOR][/SIZE][SIZE=2], OleDb.OleDbType.LongVarBinary, b.Length, ParameterDirection.Input, [/SIZE][SIZE=2][COLOR=#0000ff]False[/COLOR][/SIZE][SIZE=2], 0, 0, [/SIZE][SIZE=2][COLOR=#0000ff]Nothing[/COLOR][/SIZE][SIZE=2], DataRowVersion.Current, b))[/SIZE]
[SIZE=2]
The above code is to save an image in a sql database, in my vs2003 project the above code was perfectly acceptable and worked fine, however now that I have upgraded to vs2005 it is giving me the following error. Can someone please tell me how to solve this.
Thanks in advance
Simon
Error:
VB.NET:
[/SIZE]
[SIZE=2]Error 1 Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(parameterName As String, dbType As System.Data.OleDb.OleDbType, size As Integer, direction As System.Data.ParameterDirection, precision As Byte, scale As Byte, sourceColumn As String, sourceVersion As System.Data.DataRowVersion, sourceColumnNullMapping As Boolean, value As Object)': Argument matching parameter 'precision' narrows from 'Boolean' to 'Byte'.
'Public Sub New(parameterName As String, dbType As System.Data.OleDb.OleDbType, size As Integer, direction As System.Data.ParameterDirection, precision As Byte, scale As Byte, sourceColumn As String, sourceVersion As System.Data.DataRowVersion, sourceColumnNullMapping As Boolean, value As Object)': Argument matching parameter 'scale' narrows from 'Integer' to 'Byte'.
'Public Sub New(parameterName As String, dbType As System.Data.OleDb.OleDbType, size As Integer, direction As System.Data.ParameterDirection, precision As Byte, scale As Byte, sourceColumn As String, sourceVersion As System.Data.DataRowVersion, sourceColumnNullMapping As Boolean, value As Object)': Argument matching parameter 'sourceColumn' narrows from 'Integer' to 'String'.
'Public Sub New(parameterName As String, dbType As System.Data.OleDb.OleDbType, size As Integer, direction As System.Data.ParameterDirection, precision As Byte, scale As Byte, sourceColumn As String, sourceVersion As System.Data.DataRowVersion, sourceColumnNullMapping As Boolean, value As Object)': Argument matching parameter 'sourceColumnNullMapping' narrows from 'System.Data.DataRowVersion' to 'Boolean'.
'Public Sub New(parameterName As String, dbType As System.Data.OleDb.OleDbType, size As Integer, direction As System.Data.ParameterDirection, isNullable As Boolean, precision As Byte, scale As Byte, srcColumn As String, srcVersion As System.Data.DataRowVersion, value As Object)': Argument matching parameter 'precision' narrows from 'Integer' to 'Byte'.
'Public Sub New(parameterName As String, dbType As System.Data.OleDb.OleDbType, size As Integer, direction As System.Data.ParameterDirection, isNullable As Boolean, precision As Byte, scale As Byte, srcColumn As String, srcVersion As System.Data.DataRowVersion, value As Object)': Argument matching parameter 'scale' narrows from 'Integer' to 'Byte'. C:\Temp\VS\MRCS\frmCommManager.vb 683 44 MRCS