Updating linked table info in Access 97 database 
Author Message
 Updating linked table info in Access 97 database


I am trying to update an Access 97 database from VB6 (SP4) using the
following code. The linked table is an Excel spreadsheet a new version of
which I need to point to every morning...the file name for the spreadsheet
is based on the date so it changes every day but the sheet name is always

The code executes OK but it does not change the link at all, it is always
the same as it was before the code executed; no errors are produced. I have
checked the contents of all relevant variables in the debgger and all have
appropriate values.

'(Public gconAccess as new ADODB.Connection) declared elsewhere in the app

Dim adxCatPointage As New ADOX.Catalog
Dim adxTblPointage As New ADOX.Table

'open the schema for the data base and update the file name for the linked
Excel sheet containing the days data

   'If gconAccess.State = adStateOpen Then
     ' adxCatPointage.ActiveConnection = gconAccess
     ' Set adxTblPointage.ParentCatalog = adxCatPointage
     ' adxTblPointage.Name = "Tmp_Pointage"
     ' adxTblPointage.Properties("Jet OLEDB:Create Link") = False
     ' adxTblPointage.Properties("Jet OLEDB:Remote Table Name") = "Point"
     ' adxTblPointage.Properties("Jet OLEDB:Link Datasource") =
CStr(strPathPoint) 'contains the path\name of the day's XL sheet
     ' adxTblPointage.Properties("Jet OLEDB:Create Link") = True
   'End If

Can anybody out there see the problem with this one?


Paul BJ

Sun, 20 Apr 2003 06:53:41 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Programatically change Table links in Access 97 database

2. Access 97 - Modifying Table Links

3. Re-linking tables from MS ACCESS 97 back end

4. Linked table in Access 97 using VBA code ????

5. Linking SQL7 Tables to Access 97 via SQLDMO?

6. Seek not valid in linked tables (Access 97)

7. Saving embedded word 97 docs in Access db with linked SQL Server tables

8. filtering records, using dbgrid linked to an access 97 table

9. Data enviroment and linked tables in Access 97.

10. Problems with Linked Tables in Access 97

11. ADO using 3.51 with Links to Access 97 tables

12. Date Conversion while updating a table (Access 97 )


Powered by phpBB® Forum Software