on 2012 Aug 06 4:32 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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; try { _SAconn.Open(); Response.Write("<BR><B>OPENED</B><BR>"); } catch(SAException ee ) { Response.Write(ee.Errors[0].NativeError); }
And it's -300. The Message is blank. Is there a list of possible errors for the NativeError on the connection?
thank you
--kevin
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 http://www.sybase.com/support.
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.
--kevin
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.