"Catalin Porancea" <cp*******@midwestern.net> wrote in news:
#F**************@tk2msftngp13.phx.gbl:
Does anybody have a solution instead of sending me from one group to
another. Arm, my question is exactly about VB .Net.
I agree with Armin that your question would probably recieve a quicker
response in the ADO.Net newsgroup, but here is an answer.
Be sure to set the command type to StoredProcedure. Here is an example:
'Code starts here
Dim strCN As String = ConfigurationSettings.AppSettings("Northwind_DSN")
Dim cn As New SqlConnection(strCN)
Dim cmd As New SqlCommand
cn.Open()
With cmd
.Connection = cn
.CommandType = CommandType.StoredProcedure
.CommandText = "usp_region_save"
.Parameters.Add("@id", mintRegionId)
.Parameters.Add("@region", mstrRegionDescription)
.ExecuteNonQuery()
End With
cmd = Nothing
cn.Close()