3

We have a DSN on machine A that points to a DB on machine B. We have a machine C, that we want to be able to use that DSN on machine A...but we don't want to create the DSN on machine C.

Is there a way to use the System DSN on machine A from machine C?

TallTed
  • 269
  • 2
  • 9
Beska
  • 133
  • 1
  • 1
  • 7

4 Answers4

3

A system DSN, by definition, is local to the computer it's configured on. You'll need to create it on the other server.

An alternative option is to use a DSN-less connect string, if possible.

Maximus Minimus
  • 8,937
  • 1
  • 22
  • 36
  • Unfortunate. We're trying to avoid creating a DSN on that computer, and the connection string option is failing and we can't figure out why. (and the driver/db vendor is no help so far.) Thanks for the answer. – Beska Jun 23 '09 at 16:14
  • (Assuming I don't get an answer that contradicts this, or provides a great deal more detail, relatively soon, I'll mark this as accepted.) – Beska Jun 23 '09 at 16:18
2

No, the purpose of a DSN is a connection from one machine to one data source. It is not possible to the best of my knowledge to "proxy" a DSN connection from one machine to the other.

Dan
  • 852
  • 1
  • 8
  • 27
1

yes, you can... i know this answer don't bother you after several years of asking this question, but i think it might help other people looking out for it.

You can achieve this using DSN less approach

For Example : connection string for SQL server DSN

oConn.Open "Driver={SQL Server};" & _
           "Server=xxx.xxx.xxx.xxx;" & _
           "Address=xxx.xxx.xxx.xxx,1433;" & _
           "Network=DBMSSOCN;" & _
           "Database=myDatabaseName;" & _
           "Uid=myUsername;" & _
           "Pwd=myPassword"

I have already tried it myself, however you need to have sufficient access rights

More DSN connection strings can be found Here

Bravo
  • 111
  • 2
1

Yes, you can, but it requires a third-party solution such as that from my employer.

These solutions typically entail installing some components on the data consuming machine (C) and some components on the machine with the ODBC DSN (A). The connection winds up looking like

ODBC consumer on C
   -> ODBC Bridge DSN on C
       -> ODBC Bridge components on A
           -> ODBC DSN on A
               -> target DBMS on B
TallTed
  • 269
  • 2
  • 9