View Full Version : Customize connection string on linked table


SimonB1978
02-05-2010, 05:38 AM
Hi,

Does anyone know how I can change the connection string on a linked table (Exchange).

I did attach the Exchange GAL as a table with the wizard. It works except that it looks for a Schema.ini file in C:\DOCUME~1\bousi8\LOCALS~1\Temp\ which is MY folder. The problem is that multiple users will use this app and I don't want to go around and create them the linked table individually.

I just want to be able to have the Schema.ini file on the network and have the linked table use that file. Is this possible at all?

Thanks,

Simon B.

brixie11
02-06-2010, 11:58 AM
I don't know how this is in exchange, but I have firebird linked tables connected as network connection. It might be the best idea to look on net for apropriate driver to set up the network connection.

Banana
02-06-2010, 12:02 PM
Generally speaking, you can't customize a linked table's connection string after the linked table has been appended to the TableDefs collection.

If you want to customize connection strings that's not provided via the Access UI, then you may want to do it via VBA. The process would be quite similar to what you would need to do for a DNS-less connection.

See if this (http://access-programmers.co.uk/forums/showthread.php?t=158159) gives you a start.

SimonB1978
02-08-2010, 05:17 AM
Thanks Banana!

That worked using the "minimum code" to create it with VBA. However, I did try the same thing earlier by including the connection string and table name in the CreateTableDef method arguments, and for some reasons that won't work...

Simon B.