on 2017 Aug 24 12:10 PM
I am using DSN files with Adaptive Server Anywhere 17. I am having problems using the INITSTRING entry to authenticate the database. It appears that the embedded semicolon is terminating the necessary command and needs to be escaped. Here's (with authentication information removed) the DSN file entry:
INITSTRING=”SET TEMPORARY OPTION connection_authentication='Company=MyCompany;Application=MyApplication;Signature=aaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccdddddddddddddddddddddeeeeeeeeeeeeefffff’;”In the dbsrv17 logs, this is interpreted like this:
=,<,1,PREPARE,”SET TEMPORARY OPTION connection_authentication='Company=MyCompany +5,E,1,-131,Syntax error near '”' on line 1Clearly, the statement is truncating at the semicolon.
Does anyone know how I can restructure this DSN file entry do the statement is not truncated?
Request clarification before answering.
Figured it out. Surround the command with {} characters. For my example, the entry would be:
INITSTRING={SET TEMPORARY OPTION connection_authentication='Company=MyCompany;Application=MyApplication;Signature=aaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccdddddddddddddddddddddeeeeeeeeeeeeefffff’;}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wild guess: The following relates to ODBC connection strings in .NET but does also explain the use of curly braces to escape particular chars...
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.