RE: ODBC/DAO Connection timeout dialog
- From: v-kevy@xxxxxxxxxxxxxxxxxxxx (Kevin Yu [MSFT])
- Date: Tue, 31 Jan 2006 04:00:41 GMT
Hi ZV,
Try to create a new workspace like the following and the dialog box will
not be shown again.
Private Sub OpenDatabase()
Dim cs As String
Dim cn As DAO.Database
Dim ws As DAO.Workspace
Set ws = DBEngine.CreateWorkspace("", "", "", dbUseODBC)
cs = "ODBC;DRIVER=SQL Server;SERVER=webcache;DATABASE=news;APP=Visual
Basic; WSID=wks3;UID=user;PWD=aaa"
On Error Goto err
Set cn = ws.OpenDatabase("DSN", dbDriverNoPrompt, True, cs)
msgbox "ok"
cn.close
Exit Sub
err:
Debug.Print "Error opening connection"
End Sub
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
.
- References:
- RE: ODBC/DAO Connection timeout dialog
- From: Kevin Yu [MSFT]
- RE: ODBC/DAO Connection timeout dialog
- Prev by Date: Re: creating a database
- Next by Date: Re: generic odbc driver for oledb data sources?
- Previous by thread: RE: ODBC/DAO Connection timeout dialog
- Next by thread: Disconnected data help
- Index(es):
Relevant Pages
|
|