Instead of using a scalar stored procedure, use a scalar function instead. The dataset designer will correctly determine the data type for the scalar function. You only need to use the scalar stored procedure if you make changes to the data during the request. The scalar function is read-only. You can also very conveniently drag a function into your dataset as a query instead of going through the wizard.
If you insist on using a stored procedure or a regular query, you can always do your result like this (in VB) ...
Dim ta As New DataSet1TableAdapters.QueriesTableAdapter
Dim result As Decimal = DirectCast(ta.StoredProcedure1, Decimal)
or with the option Infer On
Dim resultInfer = DirectCast(ta.StoredProcedure1, Decimal)
source
share