Since you are working with DAO, I'm assuming that you are using VB to gain
access. With DAO, you can go through the JET database engine, or through
ODBCDirect (or through the VBSQL API's).
Try setting up an error handler in your code:
Sub MyConnectCode()
Dim db as Database
dim ws as Workspace
Dim rs as Recordset
On Error Goto EH
Set ws = DBEngine.CreateWorkspace("","", Admin,dbUseODBC)
Set ws.db = OpenDatabase("",False, False,
"ODBC;DATABASE=pubs;UID=sa;PWD=xxx;DSN=Frogger")
Set rs = db.OpenRecordSet("some sql string")
...
...
...
Exit Sub
EH:
If Err.Number = xxxxx then
.....
End Sub
Hope this helps
--
Rick Sawtell MCP, MCT, MCSD
We are what we repeatedly do. Excellence, then, is not an act, but a
habit. -- Aristotle
>Is there any way to connect to an SQL server using
>DAO in such a way that if there is an error no messages
>will be shown, but instead it will let me handle the errors
>instead.
>In other words, can I set a flag or something to create a silent
>connection.
>thanks in advance
>Keith