Je roule une requête et mon application VB.Net décide après x secondes que c'est assez et me donne un timeout, quand je roule la requête à la main sur le serveur, la requête prend 2 minutes à rouler mais me donne un résultat.
Je ne trouve pas comment augmenter le délai d'attente.
Voici mon code, quelqu'un peut m'aider?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
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 Public Function GetDataInDGV(ByVal selectCommand As String, ByRef DGV As DataGridView) As Integer 'Cette fonction permet de remplir un DataGrid en fonction d'un SELECT SQL Dim dataAdapter As New SqlDataAdapter() Dim bindingSource1 As New BindingSource() ' Create a new data adapter based on the specified query. dataAdapter = New SqlDataAdapter(selectCommand, strConnectionString) ' Create a command builder to generate SQL update, insert, and ' delete commands based on selectCommand. These are used to ' update the database. Dim commandBuilder As New SqlCommandBuilder(dataAdapter) ' Populate a new data table and bind it to the BindingSource. Dim table As New DataTable() table.Locale = System.Globalization.CultureInfo.InvariantCulture dataAdapter.Fill(table) bindingSource1.DataSource = table DGV.DataSource = bindingSource1 ' Resize the DataGridView columns to fit the newly loaded content. DGV.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader) GetDataInDGV = bindingSource1.Count End Function
Partager