Function MyQueryMethod() As System.Data.DataSet
Dim connectionString As String = "server='serv-sql'; trusted_connection=true; database='EUDO_TEST'"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String
Dim dbCommand As System.Data.IDbCommand
Dim dataAdapter As System.Data.IDbDataAdapter
Dim dataSet As System.Data.DataSet= New System.Data.SqlClient.SqlCommand
querystring= "select table.champ1, table2.champ1, table2.champ3, table.champ2, table2.champ4 from table2" _
& " inner join table on table.champ1=table2.champ2 " _
& " where table.champ1 like '%qqch%' and table2.champ2=2003"
dbcommand= New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
dataAdapter= New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
dataAdapter.Fill(dataSet)
Return dataSet
End Function
Sub DataList1_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
-------------------------------------------------
Mais je fais comment pour insérer mon response.write dans ma page Internet ????
SuperBouly
Messages postés410Date d'inscriptiondimanche 1 février 2004StatutMembreDernière intervention 8 mai 2010 21 nov. 2006 à 11:32
il faut je crois introduire un dataview du genre (je résume)
dim dv as new dataview
dv.table=mon dataset.tables("matable")
et , si tu veux, response.write(dv("monchamp"))
@+Gilles