Problem:
What is the format of the connect statement when using a File DSN?
OpenESQL application using a File DSN to CONNECT returns a -19703 SQLCODE.
Resolution:
The following formats are supported:
1. EXEC SQL
CONNECT USING
'FileDSN=testfile.dsn;UID=user;PWD=passwd'
END-EXEC
2. EXEC SQL
CONNECT USING
'FileDSN=test2file.dsn'
END-EXEC
If SQL Server uses Windows authentication, and the file DSN is set up with Windows NT authentication using the Network login id, instead of with SQL Server authentication, using a login ID and password entered by the user:
3. CONNECT WITH PROMPT