SubSonic-3.0 icon indicating copy to clipboard operation
SubSonic-3.0 copied to clipboard

Sps class fails in simple procedure

Open Apocatastasis opened this issue 15 years ago • 3 comments

Apocatastasis avatar Oct 23 '09 17:10 Apocatastasis

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.

Apocatastasis avatar Oct 23 '09 17:10 Apocatastasis

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

Apocatastasis avatar Oct 23 '09 17:10 Apocatastasis

OK, that's problem of the VB template, wich doesn't generate the parameter type.

Apocatastasis avatar Oct 23 '09 18:10 Apocatastasis