hi, can u please tell me how to check NOT RECORD FOUND Check
i mean if the record set is empty then a msg box may be shown .
thanks
i m using vb.net (vs) with sql server 2005
===================================
i mean if the record set is empty then a msg box may be shown .
thanks
i m using vb.net (vs) with sql server 2005
===================================
VB.NET:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim connectionstring As String = "Data Source = .\SQLEXPRESS; Initial Catalog = master; Integrated Security = true"
Dim theDatabase As New SqlClient.SqlConnection(connectionstring)
theDatabase.Open()
Dim thecommand As New SqlClient.SqlCommand
thecommand.CommandType = CommandType.StoredProcedure
thecommand.CommandText = "Getname"
thecommand.Connection = theDatabase
thecommand.Parameters.AddWithValue("@PriKey", 25)
Dim outparam As SqlClient.SqlParameter = thecommand.Parameters.Add("@RecName", SqlDbType.Char, 50)
outparam.Direction = ParameterDirection.Output
thecommand.ExecuteNonQuery()
MsgBox(outparam.Value)
TextBox1.Text = Trim(outparam.Value)
End Sub
End Class