On my class module:
Public Sub OptListTwoVal(ByVal List As Object, ByVal sQuery As String, ByVal sConn As String)
Using LibConn As New System.Data.SqlClient.SqlConnection(sConn)
LibConn.Open()
Dim cu As New System.Data.SqlClient.SqlCommand(sQuery, LibConn)
Dim cr As System.Data.SqlClient.SqlDataReader = cu.ExecuteReader()
With cr
If .HasRows Then
While .Read
List.Items.Add(New ListItem(.Item(1).ToString, .Item(0).ToString))
End While
End If
End With
End Using
End Sub
On my Page:
I am adding a parameter like this
LibMain.sSelect = "EXEC spt_PhysiciansModule"
Try
LibMain.AddParameter("@QType", SqlDbType.Char, "A", , ParameterDirection.Input)
LibMain.AddParameter("@Desc1", SqlDbType.Char, "", , ParameterDirection.Input)
LibMain.AddParameter("@Desc2", SqlDbType.Char, "", , ParameterDirection.Input)
LibMain.OptListTwoVal(ddlPhyType, LibMain.sSelect, LibMain.connClaims)
Catch ex As Exception
The error msg is
{"Procedure or Function 'spt_PhysiciansModule' expects parameter '@Qtype', which was not supplied."}
whats wrong with my code? please help..