when I execute from sa 11 build 2960 interactive sql: START EXTERNAL ENVIRONMENT CLR; I get

         SQL ERROR
Could not exec statement
External environment 'CLR' not found
SQLCODE=-, ODBC 3 State="HY000"
Line 1, column 28

I do have C:\Program Files\SQL Anywhere 11\Bin64 and C:\Program Files\SQL Anywhere 11\Bin32 the required assembly files: dbextclr11.exe,dbextenv11.dll, dbexternc11.exe, dbextf.dll

what should I do to enable clr integration so I can use clr dll functions and methods in my stored proc?

btw - I saw the article in doc exchange for sa 12 for testing if eternal env but not for sa 11 - when I tried to execute by doublicking in windows 8 explorer the dbextclr11.exe - I get a DOS windows then

[Window Title]

[Main Instruction]
Do you want to automatically send more information about unsolved problems?

Sending information can help Microsoft create solutions.  To see what types of information Windows can send, read our privacy statement online.

[Yes, send more information automatically (recommended)] [No, ask me each time]

If I go debug, I get

System.IndexOutOfRangeException was unhandled
  Message="Index was outside the bounds of the array."
       at iAnywhere.SAClrMain.Main(String[] args)

I also tried the windows 8 compatibility wizard,Still get the same error

the file version of dbextclr11.exe is, date modified 2013-13-25 2:03Pm Size 49.8KB

asked 16 Jul '13, 17:51

gg99's gravatar image

accept rate: 0%

edited 16 Jul '13, 20:40

Breck%20Carter's gravatar image

Breck Carter

I also tried

alter external environment clr location 'bin32\dbextclr11'; but for the effort I was rewarded with Could not execute statement. External environments are not supported for this database SQLCODE=-1206, ODBC 3 State="HY000" Line 2, column 1

--START EXTERNAL ENVIRONMENT CLR alter external environment clr location 'bin32\dbextclr11'

(16 Jul '13, 19:58) gg99

answer my own question a few hours after searching, the hint for the External environments are not supported for this database SQLCODE=-1206 found in http://infocenter.sybase.com/help/topic/com.sybase.help.sqlanywhere.11.0.1/PDF/saerrors_en11.pdf

I backup the database and upgrade, voila I got no error from START EXTERNAL ENVIRONMENT CLR

So in summary, the following steps can be applied to trouble shoot problem:

  1. if one have trouble creating clr external proc or function, try START EXTERNAL ENVIRONMENT CLR
  2. if that fails, try alter external environment CLR location 'bin32dbextclr11';
  3. if the error message is "the database does not support external environment", close off all windows and process for sql anywhere except for the Sybase central. use the upgrade tool to upgrade the database
  4. if other error make sure the dbextclr11.exe is in a directory in the path
  5. Note for Sql anywhere 12, use dbextclr12 instead
permanent link
This answer is marked "community wiki".

answered 16 Jul '13, 20:42

gg99's gravatar image

accept rate: 0%

edited 16 Jul '13, 20:58

Your answer
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](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:


question asked: 16 Jul '13, 17:51

question was seen: 1,227 times

last updated: 16 Jul '13, 20:58