P
Patrice Raucq
Hi all,
I have a timeout problem when retrieving data from my DB in a C# program.
Everything is OK at design time : I can generate a Dataset and populate it
with its data.
Important note : the View1 is based on a UserDefined function returning a
table variable, it takes 54 seconds to retrieve the data in SQL Analyser and
approximatly the same in the VS designer.
At runtime, this usual code crashes :
-----------------------------------------------
sqlConnection1.Open();
try
{
sqlDataAdapter1.Fill(dataSet11); // crashes here.
dataGrid1.DataSource = dataSet11;
dataGrid1.DataSource = "View1";
}
catch (Exception erreur)
{
MessageBox.Show(erreur.Message);
}
sqlConnection1.Close();
-----------------------------------------------
1. How can the designer work differently ?
2. Where could I tell my connection to wait a longer time ?
Thanks in advance,
Patrice.
I have a timeout problem when retrieving data from my DB in a C# program.
Everything is OK at design time : I can generate a Dataset and populate it
with its data.
Important note : the View1 is based on a UserDefined function returning a
table variable, it takes 54 seconds to retrieve the data in SQL Analyser and
approximatly the same in the VS designer.
At runtime, this usual code crashes :
-----------------------------------------------
sqlConnection1.Open();
try
{
sqlDataAdapter1.Fill(dataSet11); // crashes here.
dataGrid1.DataSource = dataSet11;
dataGrid1.DataSource = "View1";
}
catch (Exception erreur)
{
MessageBox.Show(erreur.Message);
}
sqlConnection1.Close();
-----------------------------------------------
1. How can the designer work differently ?
2. Where could I tell my connection to wait a longer time ?
Thanks in advance,
Patrice.