Thanks again James
Sorry to be persitant but I have a situation where the server is often
unavailable.
The ADO connection is only used prior to the actual table connection routine
routine, to check whether Server and DB exist. This is used because a DAO
connection check has no timeout unavoidable system messages when the server
is not available. Am I correct in thinking there is no way to avoid this
intermingling?
I would prefer to use ADO throughout, but I'm not sure if that is wise when
there are quite few DAO routines still in the client file. What do you
think??
Nev
"James Lankford" <dragonzfang@_nospam_.hotmail.com> wrote in message
news:vq4std3i3654ac@corp.supernews.com...[color=blue]
> You're opening an ADO connection then trying to convert it to DAO? Why[/color]
would[color=blue]
> you want to do that? I'm not sure if that can be done. I would recommended
> one or the other, at least for a single procedure. I often use both ADO[/color]
and[color=blue]
> DAO in my applications, but I usually don't intermingle them within a[/color]
single[color=blue]
> procedure.
>
> --
> James Lankford
>
>
> "Nifty" <ask@me ifyouwantknow.com> wrote in message
> news:3fa1922a$1@isuwb1.itbcorpweb.det.nsw.edu.au.. .[color=green]
> > James
> >
> >
> >
> > Thankyou for putting me straight! Of course you are correct - the code[/color][/color]
I[color=blue][color=green]
> > pinched, initially creates an
> >
> > ADO connection string, checks in ADO with a timeout of 3, then converts[/color][/color]
it[color=blue][color=green]
> > to a DAO string for the actual connection. I had stupidly returned the
> > whole routine to ADO thinking I was modernising it!!
> >
> >
> >
> > I've now returned to the check in ADO with the timeout of 3, so that bit[/color]
> is[color=green]
> > solved. Thankyou.
> >
> >
> >
> > My front end is large and still has many DAO routines. If I try to link[/color]
> on[color=green]
> > the ADO string, I receive the error:
> >
> >
> >
> > 3170: Could not find installable ISAM which, despite
> >
> >
> >
> >
http://support.microsoft.com/default...b;EN-US;155666
> >
> >
> >
> > I don't really understand.
> >
> >
> >
> > Should I persue the ADO connection??
> >
> >
> >
> > Nev
> >
> >
> >
> >
> >
> > "James Lankford" <dragonzfang@hotmail.com> wrote in message
> > news:vprp9qcs3hk120@corp.supernews.com...[color=darkred]
> > > Your code below is not using an ADO connection, rather it's using DAO.[/color][/color][/color]
I[color=blue][color=green][color=darkred]
> > > didn't see anywhere that you were attempting an ADO connection??
> > >
> > > --
> > > James Lankford
> > >
> > >
> > > "Nifty" <ask@me ifyouwantknow.com> wrote in message
> > > news:3f9db7fc$1@isuwb1.itbcorpweb.det.nsw.edu.au.. .
> > > > Thanks for your prompt reply.
> > > >
> > > > I'm still a novice at this and wonder if I could ask for a sample[/color][/color][/color]
line[color=blue][color=green]
> > of[color=darkred]
> > > > how to use the ConnectionTimeout method. My code is below.
> > > >
> > > > Many thanks in anticipation
> > > >
> > > > Nev
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Public Function bolCheckODBCAttachment(ByVal pstrTable As String) As
> > > Boolean
> > > >
> > > >
> > >[/color]
> >[/color]
>[/color]
' --------------------------------------------------------------------------[color=blue][color=green][color=darkred]
> > > > ----
> > > >
> > > > On Error GoTo Err_bolCheckODBCAttachment
> > > >
> > > > bolCheckODBCAttachment = False
> > > >
> > > > DoCmd.Hourglass True
> > > >
> > > > '18/10/03 Code from:
> > > >
> > > > 'Microsoft Knowledge Base Article - 210319
> > > >
> > > > 'ACC2000: How to Trap ODBC Logon Error Messages
> > > >
> > > >
> > > > Dim dbs As DAO.Database
> > > >
> > > > Dim qdf As DAO.QueryDef
> > > >
> > > > Set dbs = CurrentDb()
> > > >
> > > > Set qdf = dbs.CreateQueryDef("")
> > > >
> > > > qdf.Connect = pstrTable
> > > >
> > > >
> > > > qdf.ReturnsRecords = False
> > > >
> > > > qdf.sql = "SELECT * FROM tblOptions"
> > > >
> > > > qdf.Execute
> > > >
> > > > bolCheckODBCAttachment = True
> > > >
> > > > Exit_bolCheckODBCAttachment:
> > > >
> > > > DoCmd.Hourglass False
> > > >
> > > > Exit Function
> > > >
> > > > Err_bolCheckODBCAttachment:
> > > >
> > > > bolCheckODBCAttachment = False
> > > >
> > > > DoCmd.OpenForm "zsfrmAttach", , , , , A_DIALOG
> > > >
> > > > GoTo Exit_bolCheckODBCAttachment
> > > >
> > > > End Function
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "James Lankford" <dragonzfang@hotmail.com> wrote in message
> > > > news:vppdks5v2pthd8@corp.supernews.com...
> > > > > That is probably the default. You can use the ConnectionTimeout[/color][/color]
> method[color=green][color=darkred]
> > > of
> > > > > the ADO connection object and set it to whatever you want.
> > > > >
> > > > > --
> > > > > James Lankford
> > > > >
> > > > >
> > > > > "Nifty" <ask@me ifyouwantknow.com> wrote in message
> > > > > news:3f9c699c$1@isuwb1.itbcorpweb.det.nsw.edu.au.. .
> > > > > > After creating a routine to select from past ADODB connection[/color]
> > strings,[color=darkred]
> > > I
> > > > > >
> > > > > > found that it takes 60 seconds to timeout! I found the Microsoft
> > > article
> > > > > >
> > > > > > below
> > > > > >
> > > > > > <http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>
> > > > > >
> > > > > > but wonder if anyone has a work around.
> > > > > >
> > > > > > Nev
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]