Operand type clash: nvarchar is incompatible with image

后端 未结 2 1297
青春惊慌失措
青春惊慌失措 2021-01-17 17:22

I\'m using a SQL Server 2008 stored procedure to create a new record with this syntax:

cmd.Parameters.Add(\"@photo\", DBNull.Value)
cmd.ExecuteNonQuery()
         


        
2条回答
  •  别那么骄傲
    2021-01-17 17:42

     Dim photo_NULL As New SqlTypes.SqlBytes
    .Pararameters.AddWithValue("@photo", IIf(IsNothing(Photo), photo_NULL, Photo))
    .CommandType = CommandType.StoredProcedure
    F_return = (.ExecuteNonQuery > 0)
    

提交回复
热议问题