1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| strSQL = "SELECT PCE_T_dossiers.Nature, PCE_T_dossiers.Montant, PCE_T_dossiers.Titre, PCE_T_dossiers.Intitule, CONVERT(varchar, PCE_T_dossiers.DatePayement, 103) AS [Date Payement] " & _
"FROM PCE_T_dossiers LEFT JOIN PCE_T_huissiers ON PCE_T_dossiers.Huissier=PCE_T_huissiers.Huissier " & _
"WHERE PCE_T_dossiers.Dossier=" & Me.lstDossiers.SelectedValue
ObjetConnection = New SqlConnection()
ObjetConnection.ConnectionString = PCEConn
Try
ObjetConnection.Open()
ObjetCommand = New SqlCommand(strSQL)
ObjetCommand.CommandTimeout = 0
ObjetDataAdapter = New SqlDataAdapter(ObjetCommand)
ObjetCommand.Connection() = ObjetConnection
ObjetDataAdapter.Fill(ObjetDataSet, "T_dossiers")
ObjetDataTable = ObjetDataSet.Tables("T_dossiers")
ObjetConnection = Nothing
ObjetCommand = Nothing
ObjetDataAdapter = Nothing
Me.gvDossier.DataSource = ObjetDataTable
Me.gvDossier.DataBind()
ObjetDataSet.Clear()
Catch ex As SqlException
Response.Write("Connection erreur: 0000000020 <br/>")
Response.Write(ex.Message)
Exit Sub
End Try |
Partager