kshumway
asked on
Passing parameter to Stored Procedure
I have the following stored procedure. I want to pass HTCode from my VB.Net subroutine and then received the values back in a datatable. Is that possible? If so, could someone help me out with the code?
ALTER PROCEDURE dbo.HospBillingCodeLoop
(
@HTCode varchar(50)
)
AS
SELECT * FROM [Hospital Billing Data SQL] WHERE HTCode = @HTCode
RETURN
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you! It worked perfectly.
con.ConnectionString = Settings.ConnectionString(
con.Open()
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedur
cmd.CommandText = "HospBillingCodeLoop"
cmd.Parameters.Add("@HTCod
DataReader dr = cmd.ExecuteReader();
DataSet ds = new Dataset();
ds.Load(dr);
...