If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Visual Studio 2008 to SQL Proc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-24-09, 17:28
VeroneLazio VeroneLazio is offline
Registered User
 
Join Date: Sep 2009
Posts: 1
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!!
Reply With Quote
  #2 (permalink)  
Old 09-25-09, 13:03
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
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? ***
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On