2 Replies Latest reply: Aug 29, 2014 2:43 PM by Paul Routledge RSS

    Sybase Connection String

    Paul Routledge

      Can anyone advise on the best approach for specifying a Sybase connection string.

       

      When using Oracle OLEDB drivers I use a connectoin string like

       

      SET ConnectString='[Provider=OraOLEDB.Oracle;Data Source=(TNS_NAMES_ENTRY)] (XUserId is X, XPassword is Y)';

       

      OLEDB CONNECT TO $(ConnectString);

       

      Where TNS_NAMES_ENTRY is the filkl specification for Oracle as it might appear in a tnsnames.ora file.

       

      This does not require any other settings on the server, no tnsnames.ora file no entries in the Windows ODBC administrator.

       

      I want to do something similar for Sybase Adaptive Server 15.7 using ODBC. Again I would prefer to not have a sybase sql.ini file that needs maintaining and do not want to set up a DSN in Windows ODBC Administrator.