remote DSN connection

Results 1 to 2 of 2

Thread: remote DSN connection

  1. #1
    JohnH Guest

    Default remote DSN connection

    Ive been happily writing asp pages using DSN-less connections to access databases residing on the same server as my pages - now i have to connect remotely to a DB2 database using a system DSN - does anyone know how to do this? here is my (nonfunctional ) code so far.<BR><BR>Set conn=Server.CreateObject("ADODB.Connection")<BR>co nn.Open "DSN=odbc:db2://<BR>[remote IP here]<BR>/TEST", "admin", "admin"<BR><BR>sqlstmt = "Select * from COFFEE where CO_ROAST=&#039Dark&#039"<BR>Set rs = conn.Execute(sqlstmt)<BR>

  2. #2
    IRon Guest

    Default RE: remote DSN connection

    &nbsp;<BR>I have always set up an ODBC session under "ODBC Data Sources" applet from Control Panel. The configuration details are then contained in that DSN and you simply refer to it by name.<BR><BR>conn.ConnectionString = "DSN=MyDB2DSN" <BR><BR>However, you would need to have access to the server console, or request the admin to set up the ODBC DSN.<BR><BR>It is possible that you could set up the connection on your PC as a file DSN and then use the details from that file to build your connection string.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts