I am attempting to refresh the tables when the users start the program everyday. the application is an Access 2000 application with a SQL Server backend. So far i have the code below on the onload event.
Dim CNN As ADODB.Connection
Dim CAT As ADOX.Catalog
Dim TBL As ADOX.Table
Set CNN = CurrentProject.Connection
Set CAT = New ADOX.Catalog
CAT.ActiveConnection = CNN
For Each TBL In CAT.Tables
TBL.Properties("Jet OLEDB:Link Provider String" = "ODBC;DSN=Bar Examiners;Database=Trainging2"
Next
however, when i execute this code i recieve the following error message:
Run-time error '-2147467259(80004005)':
ODBC--connection to 'Bar Examiners' failed.
There seems to be endless possiblities as to why this didn't work, any idea?
Jason
Dim CNN As ADODB.Connection
Dim CAT As ADOX.Catalog
Dim TBL As ADOX.Table
Set CNN = CurrentProject.Connection
Set CAT = New ADOX.Catalog
CAT.ActiveConnection = CNN
For Each TBL In CAT.Tables
TBL.Properties("Jet OLEDB:Link Provider String" = "ODBC;DSN=Bar Examiners;Database=Trainging2"
Next
however, when i execute this code i recieve the following error message:
Run-time error '-2147467259(80004005)':
ODBC--connection to 'Bar Examiners' failed.
There seems to be endless possiblities as to why this didn't work, any idea?
Jason