Using SQL Anywhere on Windows, we prefer to use the SQL Anywhere environment variables like ASANY8 or SQLANY12 when specifying the path for the binaries.

While this works fine in batches and the Windows shell, it doesn't seem to work in ODBC DSNs when specifying the path for the StartLine command parameter. So the following won't work for the typical "SQL Anywhere 12 Demo" system DSN:

Startline = %SQLANY12%\Bin32\dbeng12.exe 

(From a technical point, this seems to be due to the fact that this parameter is stored in the registry with a REG_SZ type and not a REG_EXPAND_SZ type.)

Is my understanding correct?

And would it be possible to support environment variables in DSNs in future versions?

asked 16 Sep '10, 15:19

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 17 Sep '10, 07:30

Could be possibly as useful for other path-containing parameters like DatabaseFile or Driver...

(16 Sep '10, 16:00) Volker Barth

...and xp_cmdshell calls too!

(17 Sep '10, 21:39) Breck Carter

@Breck: I guess they somehow do work in xp_cmdshell but have problems with blanks in path names. Seems to be another question.

(21 Sep '10, 08:17) Volker Barth

Sigh, I just stumbled over that pitfall again when doing tests with v17... - so I'd like to ask politely: Is this something that can be fixed or improved?

(02 Sep '15, 04:34) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Sep '10, 15:19

question was seen: 1,119 times

last updated: 02 Sep '15, 04:34