<webmethod()> _ Public Function data() As ArrayList() Dim con As New SqlConnection con.ConnectionString = "Data Source=.;Initial Catalog=personnel;Integrated Security=True" con.Open() Dim Sql As String = "select Nom from Employes " Sql = String.Format(Sql) Dim Command As New SqlCommand(Sql, con) Dim dr As SqlDataReader dr = Command.ExecuteReader() 'Dim result = "" While dr.Read() result.Add(dr(0).ToString) Return result.ToArray End While Return result.ToArray Dim sas As String Dim x As New web_servive_array.Web sas = x.data(Sql).ToString con.Close() Return result.ToArray End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)