USE [Dictionary] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[usp_InsertLinkWords] @StrShort varchar(50), @WordCommon varchar(50) AS BEGIN INSERT INTO [dbo].[TblShortDescLink] ([StrShort], WordCommon ) SELECT [dbo].[TblWords].[StrShort], @WordCommon as WordCommon FROM [dbo].[TblWords] WHERE [dbo].[TblWords].StrShort=@StrShort GROUP BY StrShort END
Private Sub PanelLinkShort_Click(sender As Object, e As EventArgs) Handles PanelLinkShort.Click Dim StrProcName As String Dim selectedRowCount As Integer = DataGridViewStringsBulk.Rows.GetRowCount(DataGridViewElementStates.Selected) Dim x As String If selectedRowCount > 0 Then Dim connectionString As String = ConfigurationManager.ConnectionStrings("Dictionary").ConnectionString StrProcName = "usp_InsertLinkWords" Using conn As New SqlConnection(connectionString) Using cmd As New SqlCommand(StrProcName, conn) cmd.CommandTimeout = 0 cmd.CommandType = CommandType.StoredProcedure conn.Open() Dim StrCommon As String StrCommon = "" Dim i As Integer For i = 0 To selectedRowCount - 1 'get rows cmd.Parameters.AddWithValue("@StrShort", DataGridViewStringsBulk.SelectedRows(i).Cells("Strshort").Value) If i = 0 Then StrCommon = DataGridViewStringsBulk.SelectedRows(i).Cells("Strshort").Value Else End If cmd.Parameters.AddWithValue("@WordCommon", StrCommon) Next i End Using End Using MessageBox.Show("Finished") End If End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE