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? |
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’;} answered 24 Aug '17, 12:52 s0183616 It might also work if you had used the ordinary " characters instead of the funky ” characters... after all, that's what the error message said :)
(24 Aug '17, 13:42)
Breck Carter
Wild guess: The following relates to ODBC connection strings in .NET but does also explain the use of curly braces to escape particular chars...
(25 Aug '17, 15:20)
Volker Barth
|