G
Guest
I am using MS Access 2003 for reporting against a Progress database. When
starting my application I query some linked tables. This opens a dialog box
to logon to the Progress database. To eliminate this problem, I tried to
create a function to create a connection string, bypassing the dialog box.
The function is shown below:
Public Function change_DSN()
Dim db As Database
Dim tbldef As tabledef
Dim table As tabledef
Set db = CurrentDb
For Each table In db.TableDefs
If (table.Connect <> "") Then
table.Connect = "ODBC;DSN = dsn name; User ID=sysprogress;Pwd=abc"
table.RefreshLink
End If
Next table
End Function
The result is that the Select Data Source dialog box is called. I am using
the Progress SQL92 ODBC driver. In the example above there is a space in the
DSN. Could that be creating the problem?
thanks in advance.
starting my application I query some linked tables. This opens a dialog box
to logon to the Progress database. To eliminate this problem, I tried to
create a function to create a connection string, bypassing the dialog box.
The function is shown below:
Public Function change_DSN()
Dim db As Database
Dim tbldef As tabledef
Dim table As tabledef
Set db = CurrentDb
For Each table In db.TableDefs
If (table.Connect <> "") Then
table.Connect = "ODBC;DSN = dsn name; User ID=sysprogress;Pwd=abc"
table.RefreshLink
End If
Next table
End Function
The result is that the Select Data Source dialog box is called. I am using
the Progress SQL92 ODBC driver. In the example above there is a space in the
DSN. Could that be creating the problem?
thanks in advance.