
ActiveX DLL to ActiveX EXE
Quote:
> Use an event object to tell the other process when to terminate (see
the
> platform sdk "CreateEvent").
> Also, if you are using ADO, set a connection timeout so that you don't
> get locked in a call to the database.
> For more detailed responses, form more detailed questions.
> > I have an app that passed data to a remote SQL server, the problem
however is that the
Quote:
> > SQL server may not be available at all times and this slows down my
app incredibly,
> > what I have done is moved the number crunching section into an
ActiveX DLL as a set of
Quote:
> > functions and the section of code that speaks to the server into an
out of process
> > ActiveX EXE, the problem is that the app is still waiting if the SQL
server
> > is not available.
Activex DLL or ActiveX Exe will not make a difference here.
You didn't say if you were using DAO, RDO or ADO. You also didn't say if
the SQL Server
could disappear after you opened a connection to it or if you don't
always expect it to be
there when you want to open a connection.
All of them have requisite LoginTimeOut and QueryTimeOut properties (in
sec.)
DAO workspace.logintimeout
connection.querytimeout
database.logintimeout
database.querytimeout
querydef.odbctimeout
ADO connection.connectiontimeout
connection.commandtimeout
command.commandtimeout
RDO rdoconnection.logintimeout
rdoconnection.querytimeout
...
You could also look into executing your queries asynchronously. I hope
you are
catching the error with the first SQL statement that determines that the
SQL
server is AWOL. And I hope you are not firing any more SQL statements
once you
catch this error.
--
MikeC
Please reply to the group.