DoCmd.TransferDatabase question

W

Ward

Hi,

Ok using a command something like:

DoCmd.TransferDatabase acLink, "ODBC", _
strDBConnectionString, _
acTable, "Authors-sql", "Authors-access", False, False


Ok from the above it will transfer from a ODBC database (e.g. SQL) into the
current database and make a link to the external to the "Authors-sql" in the
remote database (on SQL Server) and call the link "Authors-access".

Ok how can I do this instead. Make a link to the SQL table but put that into
another MDB file - not the one I have open (CurrentDB).

Any ideas?

Thanks,

Ward
 
G

Guest

Application.DoCmd.TransferDatabase
only works on
Application.CurrentDB

To create link in any other database, use DAO or ADOX methods
instead of Application methods.

Is possible to use SQL statements instead, to create query on
third database, instead of linked table. Works exactly the same,
but is different underneath. You would use Create DDL to
create something like this:
select * from [mydb.mdb].[mytable].

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top