Connecting Tech Pros Worldwide Help | Site Map

DSN and linked table ?

  #1  
Old November 13th, 2005, 11:04 AM
Zlatko Matiæ
Guest
 
Posts: n/a
Hi!

What happens with linked tables if they were linked using File DSN, when I
copy the Access file on some other PC without File DSN ?
What is the difference between DSN on linked tables and pass-through queries
? Why I can change DSN for pass-through query and can't change it for linked
table, in Properties dialog box ?

Zlatko


  #2  
Old November 13th, 2005, 11:04 AM
Steve Jorgensen
Guest
 
Posts: n/a

re: DSN and linked table ?


On Wed, 18 May 2005 17:06:09 +0200, "Zlatko Matiæ" <zlatko.matic1@sb.t-com.hr>
wrote:
[color=blue]
>Hi!
>
>What happens with linked tables if they were linked using File DSN, when I
>copy the Access file on some other PC without File DSN ?[/color]

DSNs are set up for each machine. If you link a table using a DSN, then the
link will only work so long as a DSN with the same name exists on the machine
you're trying to use the database from.
[color=blue]
>What is the difference between DSN on linked tables and pass-through queries[/color]

A pass-through query passes literal SQL to the server exactly as you write it.
With linked tables, Access/JET decides how to query the server. If you make
an Access query of linked tables, JET will do its best to generate server-side
SQL to run it - it mostly does a very good job.
[color=blue]
>? Why I can change DSN for pass-through query and can't change it for linked
>table, in Properties dialog box ?[/color]

You can change the connect string for a linked table using the Linked Table
Manager.

  #3  
Old November 13th, 2005, 11:05 AM
Zlatko Matic
Guest
 
Posts: n/a

re: DSN and linked table ?


How can I change connection string for linked tables programmatically?
ro example, let's say that I have a login form and a procedure that creates
connection string using login information, so that I can use DSN-less
connection ?
How can I pass that connection string to linked tables every time when user
logs ?



"Steve Jorgensen" <nospam@nospam.nospam> je napisao u poruci interesnoj
grupi:lvom815jpnqqmdjcp8r02ib2uu8adthlq9@4ax.com.. .[color=blue]
> On Wed, 18 May 2005 17:06:09 +0200, "Zlatko Matiæ"
> <zlatko.matic1@sb.t-com.hr>
> wrote:
>[color=green]
>>Hi!
>>
>>What happens with linked tables if they were linked using File DSN, when I
>>copy the Access file on some other PC without File DSN ?[/color]
>
> DSNs are set up for each machine. If you link a table using a DSN, then
> the
> link will only work so long as a DSN with the same name exists on the
> machine
> you're trying to use the database from.
>[color=green]
>>What is the difference between DSN on linked tables and pass-through
>>queries[/color]
>
> A pass-through query passes literal SQL to the server exactly as you write
> it.
> With linked tables, Access/JET decides how to query the server. If you
> make
> an Access query of linked tables, JET will do its best to generate
> server-side
> SQL to run it - it mostly does a very good job.
>[color=green]
>>? Why I can change DSN for pass-through query and can't change it for
>>linked
>>table, in Properties dialog box ?[/color]
>
> You can change the connect string for a linked table using the Linked
> Table
> Manager.
>[/color]


  #4  
Old November 13th, 2005, 11:05 AM
Steve Jorgensen
Guest
 
Posts: n/a

re: DSN and linked table ?


On Wed, 18 May 2005 22:33:02 +0200, "Zlatko Matic" <zlatko.matic1@sb.t-com.hr>
wrote:
[color=blue]
>How can I change connection string for linked tables programmatically?
>ro example, let's say that I have a login form and a procedure that creates
>connection string using login information, so that I can use DSN-less
>connection ?
>How can I pass that connection string to linked tables every time when user
>logs ?[/color]

I'm posting this from memory now, but it's something close to...

1. Get a reference to the tabledef from the database's Tabledefs collection
2. Set the Connect property to the connect string you want
3. Call the RefreshLink method of the tabledef object.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked Table Manager won't manage prn answers 1 November 12th, 2008 03:50 PM
Linked table - ODBC connection ... failed Igor answers 0 November 17th, 2005 10:24 PM
Linked table - ODBC connection ... failed Igor answers 0 November 17th, 2005 10:24 PM
Linked Table Password Neil Ginsberg answers 4 November 13th, 2005 03:07 AM