hi guys i wanna ask how to make warning messages when a user clicks the search button and found no record with what he input.
here is my stored proc
ALTER PROCEDURE dbo.Searchbylastname
/*
(
@parameter1 int = 5,
@parameter2 datatype OUTPUT
)
*/
(
@value1 varchar(50)
)
AS
/* SET NOCOUNT ON */
SElect * from admissionRecord
where lname=@value1
and here's my other code
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
If ComboBox1.Text = "Med Staff ID" Then
searchbyMedStaffID()
ElseIf ComboBox1.Text = "Department ID" Then
searchbyMedStaffDeptID()
End If
End Sub
Private Sub searchbyMedStaffID()
Dim StrSQL As String = "Searchbylastname"
classLibrary = New ConnectionLibrary
classLibrary.openConnection(strConnection)
If Not classLibrary.isConnectionOpen() Then
Exit Sub
End If
classLibrary.initializeCommand(StrSQL)
classLibrary.addParameter("@value1", SqlDbType.VarChar, txtSearch.TextLength, txtSearch.Text)
objCommand.ExecuteNonQuery()
displayresult()
End Sub