Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba.ado
Thread: DoCmd.TransferDatabase question

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

DoCmd.TransferDatabase question
Ward 25.08.2006 18:17:02
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

Re: DoCmd.TransferDatabase question
<david[ at ]epsomdotcomdotau> 07.09.2006 12:03:15
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)


"Ward" <Ward[ at ]discussions.microsoft.com> wrote in message
news:863BC07F-9503-48B1-86C8-D58B9D50A7B8[ at ]microsoft.com...
[Quoted Text]
> 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
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net