Information générale
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
>>
>>In one of your 2 databases, link the tables of your second. This way, you will only need to open 1 connection and you will be able to join queries very easily.
>
>I know I could do this, but at some point in the near future we are probably (hopefully) going to move away from an Access database to SQL Server or some such database. So I was hoping that there was a solution that I could do only in code.
>
>It is probably going to be easier to do it in the back end though.
>
>Pete
You can do the linking programmatically like so: (this works with ACC97)
Set thisdb = CurrentDB
thisdb.TableDefs(0).Connect = "FoxPro 2.6;DATABASE=C:\myDir\"
thisdb.TableDefs(0).RefreshLink
thisdb.TableDefs.Refresh
You may want to research this a little more. I remember that to do this I already had linked tables and with this I could just change the directory where I could find them.
This is from an old ACC mdb project that was converted over to VB.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement