I am trying to call a stored procedure from some Visual Basic 2003 code and I cant figure out what I am doing incorrectly in the VB Code. The stored procedure that I am calling is returning a value. I want to evaluate what the stored procedure has returned.
*************************Here is my Visual Basic 2003 code*************
Private Function bolEligibility() As Boolean
Dim strSql1 As New StringBuilder
Dim strMessage as string
strSql1.Append("exec uspCHK_Eligibility '" & ApplNo & "'")
Dim cnnConnection1 As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim objCommand1 As SqlCommand = New SqlCommand(strSql1.ToString(), cnnConnection1)
Dim objDataAdapter1 As SqlDataAdapter = New SqlDataAdapter
Dim objDataSet1 As DataSet = New DataSet
objCommand1.CommandType = CommandType.Text
objDataAdapter1.SelectCommand = objCommand1
If objDataSet1.Tables(0).Rows(0)("App_No").ToString() <> "-1" Then
strMessage = "not eligible."
*****Here is how the SQL SERVER stored procedure looks**********
/****** Object: StoredProcedure [dbo].[uspCHK_Eligibility] Script
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE PROCEDURE [dbo].[uspCHK_Eligibility]
SET NOCOUNT ON;
IF EXISTS (SELECT * FROM tblLoan_Appl (NOLOCK) WHERE Appl_No = @ApplNo AND Status = 'N')
Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…