Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    1

    Unanswered: Visual Studio 2008 to SQL Proc

    Hello,

    I am new to Visual Basic and I am trying to create a button_Click event that will simply launch my SQL 2005 Stored Procedure, using Visual Basic within the Visual Studio 2008 environment.

    My connection is established within Visual Studio and I can see my stored procedure and right click and exec it from the Server Explorer.

    I have not been able to find the appropriate code to create this click event for my button.

    My stored procedure is called: TEST_fetch

    I am using windows authentication and my DBA rights to connect back to SQL.

    My simple application will run a stored procedure will modify a single table. I can already see this table in my Data Grid View, I would just like to hit my UPDATE button so that this data will change as the SQL stored procedure is executed. This is what I have so far:

    Imports System.Data.Odbc
    Imports System.Data
    Imports System.Data.SqlClient
    Public Class frm1HRV

    Private Sub frm1HRV_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'S0904DEMODataSetzzHourlyRateCheck.zzHourlyRateChe ck' table. You can move, or remove it, as needed.
    Me.ZzHourlyRateCheckTableAdapter.Fill(Me.S0904DEMO DataSetzzHourlyRateCheck.zzHourlyRateCheck)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


    End Sub

    Private Sub DataGridView2_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs)


    End Sub

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click



    End Sub

    Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

    End Sub

    End Class



    Thank you for any help or direction, I am a newb so I do appreciate your help!!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Look at the Update Command for your table adapter.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •