| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 
 |  
Dim oConnection As System.Data.SqlClient.SqlConnection
     Dim oCommand As System.Data.SqlClient.SqlCommand
     Dim oDataReader As System.Data.SqlClient.SqlDataReader
     Dim sSQL As String
 
     ' Création de notre connexion
     oConnection = New System.Data.SqlClient.SqlConnection
     Dim sConnectionString As String
     sConnectionString = "Server=FRWEB01;Initial Catalog=intranet;uid=crawford;pwd=crawford"
     oConnection.ConnectionString = sConnectionString
 
     ' Ouverture de la connexion
     oConnection.Open()
 
     sSQL = "SELECT Nom, CodeSegment, KAM, DateMAJ, MO, Deplacement, RemisePortes, RemiseNiveleurs, Nacelle, Notes"
     sSQL &= "FROM GC_GrandsComptes LEFT JOIN GC_TarifMO ON GC_GrandsComptes.Identifiant=GC_TarifMO.Identifiant"
 
     oCommand = New System.Data.SqlClient.SqlCommand(sSQL, oConnection)
 
     ' Lecture des données
     oDataReader = oCommand.ExecuteReader()
 
     ' Paramétrage du Repeater
     DG_1.DataSource = oDataReader
     DG_1.DataBind()
 
     ' Fermeture du DataReader et de la connexion
     oDataReader.Close()
     oConnection.Close() | 
Partager