Dear Expertise,

I am problem with coding to search the data from database using stored procedure and vb.net form. I am coding with vb language not the C#.

Explanation:

I have stored procedure named "usp_GetPayByGrade" :

 /*
 Name: usp_GetPayByGrade
 Description: Search the Record to dbo.hrGradePayScale table by gpsIntGrade
 Author: Tashi
 Modification: Update

 Description Date Changed By
 Created Procedure 27/10/2011 Tashi
 */
 CREATE proc [dbo].[usp_GetPayByGrade]
 (
 @gpsIntGrade varchar(50)
 )
 WITH ENCRYPTION
 AS
 SELECT 
gpsGrade,
 gpsIntGrade,
 gpsMinPay,
 gpsIncrement,
 gpsMaxPay,
 gpsGISGroup,
 gpsGISCont,
 gpsSWSCont,
 gpsSWSPercentageYN,
 gpsRetirementAge
 FROM [dbo].[hrGradePayScale]
 WHERE gpsIntGrade =@gpsIntGrade

when i run this store procedure in SQL its giving me correct result.

I have a form named "frmGetPayByGrade" with:

  1. Textboxes:
    gpsGrade
    gpsIntGrade = in this textbox user will enter the value
    gpsMinPay
    gpsIncrement
    gpsMaxPay
    gpsGISGroup
    gpsGISCont
    gpsSWSCont
  2. buttons:
    btnSearch
    btnClose

    When user enters the value at "gpsIntGrade" textbox and hits the "btnsearch" it should run the stored procedure and fill the stored procedure result in respective textbox.

    I have been trying to search but could not get the proper solution.

    CAN ANYONE HELP ME???????

Edited 4 Years Ago by Dani: Fixed formatting

  1. Open Google
  2. Type "SqlCommand Class Vb.Net"
  3. Click Google Search

This is basic VB.Net in particular ADO.Net

This article has been dead for over six months. Start a new discussion instead.