Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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
40.2k361550822
accept rate: 34%

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×145
×113
×5

question asked: 16 Sep '10, 15:19

question was seen: 2,571 times

last updated: 02 Sep '15, 04:34