
Specified SQL server not found.
I have a DataGrid bound to an adodc datacontrol.
At the top of the form is an array of three option
buttons.
In the click event of the option buttons there is a
procedure call to re-populate the datacontrol with a
new SQL statement.
When the form loads OptSector(1).value is true and the
datacontrol is populated accordingly. However if the
first action taken is to click optsector(2) or (3)
with the mouse, a run-time error;
firstly;
[DBNMPNTW] Specified SQL server not found.
then;
Run-time error '-2147467259(80004005)':
Method 'Refresh' of object 'IAdodc' failed
occurs.
However, if you select optsector(2) using keyboard
(arrow keys), the datacontrol is populated correctly
and no error occurs.
Similarly if you double-click on the datagrid, which
brings up a dialogue form, close the dialogue and then
select optsector(2) using the mouse, no error occurs.
I have stepped through the code, and on each occasion
the stages are identical.