You need to return the values from the stored procedure as a table. Add this to your procedure.
SELECT
@TotalCharges as [Total Charges],
@TotalDiscounts as [Total Discounts],
@TotalPayments as [TotalPayments],
@Balance as [Balance]
Then you can execute the stored procedure from your VB app and load the table into a DataTable.
int transactionID = 0;
DataTable table = new DataTable();
using (var connection = new SqlConnection("connectionString")
using (var command = new SqlCommand("sp_tblTransaction_GET_All_Totals", connection)
{
connection.Open();
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@TransID", transactionID);
using (var adapter = new SqlDataAdapter(command))
{
adapter.Fill(table);
}
}
calling a stored procedure from C# using SqlDataAdapter
Here's the documentation on SqlDataAdapter, which will include examples in both C# and VB.