How to assign and retrive values from array, arraylist dynamically........please see the questionWill enter the number of values to be inserted into array in one text boxex: n= txt_num.textand from another textbox I want to insert the 'n' values(ie varchar values)and then i want to retrive the values back such that i can use these values in select stmt of T-sql to retrive the data....and i want to display the data of all 'n' values in one table*here is the code.. for assigning and retriving pl chk this is the main prob...i can write T-sql part..........please helpImports System.Data.SqlClientImports System.DrawingPublic Class compare Dim n, i As Integer Dim compareDS As DataSet Dim compvar(i) As ArrayList Dim conn As SqlConnection Dim cmd As SqlCommand Dim DA As SqlDataAdapter Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click conn = New SqlConnection("server=acer;initial catalog=breakdiskprocessdata;integrated security=sspi") conn.Open() cmd = New SqlCommand Dim InsertString1 As String Dim txt_batchno(i) As TextBox txt_batchno(i) = New TextBox 'txt_batchno(n).Text = txtbatchno.Text n = txt_nos.Text ' For i = 0 To i = n - 1 'compvar(i) = txtbatchno.Text ' Next ' MsgBox("value of compvar(i)" & compvar(i).Item(i)) 'MsgBox("value of compvar(i)" & compvar(1)) 'For i = 0 To i = n - 1 i = 0 ' If i

Questions by vraju123

Showing Answers 1 - 1 of 1 Answers

Vishal Verma

  • Jul 25th, 2006
 

use the Lines(index) array which is a feature or textbox to retreive lines seperatly from textbox

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions