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.

Hi all, Here's my issue. I've been tasked to take a .Net 2.1 web site off of the server that also hosts the SqlAnywhere database and move it to a new web server that does not have the database.

My problem is that the new server does not have the SqlAnywhere client on it. I can copy the iAnywhere.Data.SQLAnywhere.dll assembly on to the new web server and instantiate the SAConnection object successfully, but cannot connect to the database. I don't get an error message, just an exception with a blank message.

I think this is because the DLL is not in the GAC (Global Assembly Cache) on the new server(?).

So, is it possible to use the SqlAnywhere client dll(s) from ASP.Net without putting them into the GAC, running an EXE or registering anything in the system registry? If so, what other assemblies do I need and how do I get them?

If not, is it possible to connect some other way to connect? Thanks for any help. --kevin

asked 06 Aug '12, 15:32

kjh_ngisd's gravatar image

accept rate: 0%

edited 07 Aug '12, 15:12

Justin%20Willey's gravatar image

Justin Willey

There's a huge amount of information under the Database and application deployment table of contents in the Help.

In particular, this topic may help: .NET client deployment

This topic is in a separate area of the Help: SQL Anywhere .NET Data Provider deployment

permanent link

answered 06 Aug '12, 16:25

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

Thanks for the links. I'd seen some of them before, but I'll revisit. Looks like these are the dlls I'll need: iAnywhere.Data.SQLAnywhere.dll policy.12.0.iAnywhere.Data.SQLAnywhere.dll dblg[LL]12.dll dbicu12.dll dbicudt12.dll dbcon12.dll

Strangely, I don't seem to be able to find them on my PC, but maybe the directory search isn't locating them because they're hidden or something. I'll try to locate them... thanks. --kevin

(07 Aug '12, 08:32) kjh_ngisd

Is there a list of all the possible errors that can come back on an Open()?

When I try to Open() I get a SAError with a NativeError of -300. The only list I can find that has NativeError = -300 comes from executing malformed sql, not connecting.

I'm doing this:

SACommand cmd = null;    
    SAConnection _SAconn = null;    
    _SAconn = new SAConnection();
_SAconn.ConnectionString = connString;

catch(SAException ee )

And it's -300. The Message is blank. Is there a list of possible errors for the NativeError on the connection?

thank you


(07 Aug '12, 14:49) kjh_ngisd
Replies hidden

Please show more of the code; e.g., the actual connection string.

-300 is a "call tech support" thing: Run time SQL error -- %1

Probable cause An internal database error occurred. If it can be reproduced, it should be reported to iAnywhere. You may be able to work around this problem by modifying the associated query statement.

More information You can contact Technical Support at

(07 Aug '12, 15:09) Breck Carter

Thanks for the reply. I saw that link, but thought it applied only to Sql Commands, not connections.

The database is up. I can connect from other places. I'm pretty sure it's related to the movement of the binaries into the /bin directory and the "database error" is a catch-all when there's an unknown issue.

I'm not permitted to post connection strings, unfortunately. I did, however, write a TCP socket connection test and I can get to the server.

I'm not sure what to do next. I'll have to think about it.

Thanks for the help.


(07 Aug '12, 15:47) kjh_ngisd

In ASP.Net you could add the assemblies to the bin dir of your website. But don't be afraid of the GAC, placing assemblies there is most of the time the better choice.

permanent link

answered 07 Aug '12, 06:08

Martin's gravatar image

accept rate: 14%

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]( "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: 06 Aug '12, 15:32

question was seen: 3,271 times

last updated: 07 Aug '12, 15:47