I am trying to what i think is an easy task, but so far i have came up empty.
What i want to do is take a repeating table on a form i have and submit the employee IDs to a database using a web service.
I know how to submit them one by one, but i am thinking there is an easier way to do this instead of send the value to the web service, submit thee data, and then go till the last record.
I am currently using this:
Any ideas??? I am stumped. thanks again for your help
What i want to do is take a repeating table on a form i have and submit the employee IDs to a database using a web service.
I know how to submit them one by one, but i am thinking there is an easier way to do this instead of send the value to the web service, submit thee data, and then go till the last record.
I am currently using this:
Code:
<WebMethod(Description:="sends employee id to database")> _ Public Function SendMultiple(ByVal strEmployeeID as string) As String Dim sqlCon As New SqlConnection() Dim sqlCmd As New SqlCommand() sqlCon.ConnectionString = "connection string information" If sqlCon.State = ConnectionState.Closed Then sqlCon.Open() End If sqlCmd.CommandText = "spInsertMultiple" sqlCmd.Connection = sqlCon sqlCmd.CommandType = CommandType.StoredProcedure Dim Parameter0 As SqlParameter = New SqlParameter("@EmployeeID", strEmployeeID) Parameter0.Direction = ParameterDirection.Input sqlCmd.Parameters.Add(Parameter0) Dim dr As SqlDataReader dr = sqlCmd.ExecuteScalar Dim strReturnedValue As String = "hello" Return strReturnedValue End Function
Comment