Imports System.Data.SqlClient Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connetionString As String Dim connection As SqlConnection Dim command As New SqlCommand Dim ds As New DataSet Dim sno As Integer connetionString = "Data Source= SIDHARTH-PC ;Initial Catalog= Agreement ;User ID=sa;Password= XXXXX" connection = New SqlConnection(connetionString) connection.Open() command.Connection = connection command.CommandType = CommandType.StoredProcedure command.CommandText = "ShowAgrementtext" sno = 1 command.Parameters.AddWithValue("@sno", sno) Dim reader As SqlDataReader = command.ExecuteReader() If reader.Read() Then MsgBox(Convert.ToString(reader(0))) Else End If connection.Close() End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)