How to retrieve the values from a SP
Posted on 2006-05-23
I have a simple Sp that I want to fill a datagridview with, but unfortunately I'm not to good with SP myself.
Here is the SP:
CREATE PROCEDURE [ichanneluser].[test3]
SELECT jpst_Main.ID, jpst_Main.Heading, jpst_Main.Body, jpst_Main.OpprettetAv, jpst_Main.OpprettetDato, jpst_Main.Rute, jpst_Main.Avdeling,
FROM jpst_Main INNER JOIN
jpst_Detail ON jpst_Main.ID = jpst_Detail.ID
WHERE (jpst_Detail.BrukerID = @BrukerID)
Here is the vb code
Dim sqlConn As New SqlClient.SqlConnection
sqlConn.ConnectionString = getConnection2()
It is here I would like the datagridview called "dg1_1" to be filled vith the results from the SP.