SubSonic-3.0
SubSonic-3.0 copied to clipboard
Sps class fails in simple procedure
I have a simple sp with one parameter of type int. When I try to fill my dataset with sps.executedataset I got the following error: Implicit conversion from data type sql_variant to int is not allowed. Use the CONVERT function to run this query
Línea 159: DbDataAdapter da = Factory.CreateDataAdapter(); Línea 160: da.SelectCommand = cmd; Línea 161: da.Fill(ds); Línea 162: Línea 163: return ds;
Thats seems Subsonic did not recognize the parameter type.
My code is the following:
<DataObjectMethod(DataObjectMethodType.Select, True)> Public Function ObtenerApoyosSolicitados(ByVal idProyecto As Integer) As DataTable
Return SPs.ObtenerApoyosSolicitados(idProyecto).ExecuteDataSet().Tables(0)
End Function
OK, that's problem of the VB template, wich doesn't generate the parameter type.