Connecting Tech Pros Worldwide Help | Site Map

DSN and linked table ?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 10:04 AM
Zlatko Matiæ
Guest
 
Posts: n/a
Default DSN and linked table ?

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, 10:04 AM
Steve Jorgensen
Guest
 
Posts: n/a
Default 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, 10:05 AM
Zlatko Matic
Guest
 
Posts: n/a
Default 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, 10:05 AM
Steve Jorgensen
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.