dbTalk Databases Forums  

iAnywhere.Data.SqlAnywhere.dll

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss iAnywhere.Data.SqlAnywhere.dll in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve
 
Posts: n/a

Default iAnywhere.Data.SqlAnywhere.dll - 08-11-2009 , 10:45 AM






We have a .NET program that access Sybase Anywhere 9 database using
iAnywhere.Data.SQLAnywhere that works fine in any Windows 32 bit
Operating System. When we try to use it in Windows 64 bit Operating
System, we get the following exception when it tries to open a
connection to the database using Connection.Open() command -

'The type initializer for 'iAnywhere.Data.AsaClient.AsaConnection'
threw an exception

Is there any problem with the iAnywhere.Data.SQLAnywhere.DLL when used
in Windows 64 bit Operating System? We did add to the GAC the
iAnywhere.Data.SQLAnywhere.DLL successfully, but that did not resolved
our exception error.


-Steve

Reply With Quote
  #2  
Old   
Jeff Albion [Sybase iAnywhere]
 
Posts: n/a

Default Re: iAnywhere.Data.SqlAnywhere.dll - 08-11-2009 , 11:05 AM






Hi Steve,

Which processor architecture is your .NET application targeting? Ensure
that it's set to the x64 architecture when building for the x64 system.

Regards,

Steve wrote:
Quote:
Is there any problem with the iAnywhere.Data.SQLAnywhere.DLL when used
in Windows 64 bit Operating System? We did add to the GAC the
iAnywhere.Data.SQLAnywhere.DLL successfully, but that did not resolved
our exception error.
--
Jeff Albion, Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/libr...ere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summ...&timeframe =0
Report a Bug/Open a Case : http://case-express.sybase.com/cx/

Reply With Quote
  #3  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: iAnywhere.Data.SqlAnywhere.dll - 08-11-2009 , 11:17 AM



According to http://www.sybase.com/detail?id=1026234#SA
there was no support for 64bit with ADO.NET.

There is for ODBC, OLE/DB, E/SQL, JDBC, and OpenClient
but ADO.Net did not provide this until V10

http://www.sybase.com/detail?id=1051965#SA

along with the 2.0 framework support

http://dcx.sybase.com/html/dbwnen10/...s-3641153.html

and name changes and a few new features.

I suspect that is because x86_64 mode came late to 9.0.2
and the .Net stuff just didn't make it in.

"Steve" <watsupdoc2 (AT) gmail (DOT) com> wrote

Quote:
We have a .NET program that access Sybase Anywhere 9 database using
iAnywhere.Data.SQLAnywhere that works fine in any Windows 32 bit
Operating System. When we try to use it in Windows 64 bit Operating
System, we get the following exception when it tries to open a
connection to the database using Connection.Open() command -

'The type initializer for 'iAnywhere.Data.AsaClient.AsaConnection'
threw an exception

Is there any problem with the iAnywhere.Data.SQLAnywhere.DLL when used
in Windows 64 bit Operating System? We did add to the GAC the
iAnywhere.Data.SQLAnywhere.DLL successfully, but that did not resolved
our exception error.


-Steve

Reply With Quote
  #4  
Old   
Chris Keating [Sybase iAnywhere]
 
Posts: n/a

Default Re: iAnywhere.Data.SqlAnywhere.dll - 08-12-2009 , 08:16 AM



If your SQL Anywhere software is 32 bit, you will need to compile your
application to target x86. By default, .NET applications compile as 'Any
CPU' and run to match the bitness of the operating system. This works
only if there is no unmanaged code - which is not the case with the SQL
Anywhere .NET driver.

Steve wrote:
Quote:
We have a .NET program that access Sybase Anywhere 9 database using
iAnywhere.Data.SQLAnywhere that works fine in any Windows 32 bit
Operating System. When we try to use it in Windows 64 bit Operating
System, we get the following exception when it tries to open a
connection to the database using Connection.Open() command -

'The type initializer for 'iAnywhere.Data.AsaClient.AsaConnection'
threw an exception

Is there any problem with the iAnywhere.Data.SQLAnywhere.DLL when used
in Windows 64 bit Operating System? We did add to the GAC the
iAnywhere.Data.SQLAnywhere.DLL successfully, but that did not resolved
our exception error.


-Steve

Reply With Quote
  #5  
Old   
Steve
 
Posts: n/a

Default Re: iAnywhere.Data.SqlAnywhere.dll - 08-14-2009 , 10:43 AM



That's it. I recompiled my application with target set to only x86 and
that fixed my problem. Thanks.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.