Can I use REXX/SQL with Microsoft SQL Server

Help
Ted Holien
2005-08-02
2013-04-25
  • Ted Holien
    Ted Holien
    2005-08-02

    I've gotten this to work with an ODBC data source defined.  However, I'd ideally like to get this to work without that.  Does anyone know the proper sqlconnect call format to make this happen?  I've tried and I just get return code -76.  Or since MSSQL isn't in the list of supported databases, maybe using ODBC is the only way?

     
  • Hagrinas
    Hagrinas
    2008-03-31

    If you want to connect without setting up a DSN for ODBC, then use a connect string. For example, with the test program that comes with the software, use the command (adapted appropriately):

      rexxsql simple.cmd serv="Driver={SQL Server};Server=Machine1\SQLSERVERNAME;db=master;Trusted_Connection=Yes" 

    or rc = sqlconnect( "C1", , , , connect_string ) -- connect_string works as above.

    In the first example,Trusted_Connection=Yes could be replaced by "uid=myname;pwd=myPass" as needed.