cancel
Showing results for 
Search instead for 
Did you mean: 

Exception Errors in SQL Anywhere 17 Deployment

Former Member
0 Kudos

Hi everyone!

I do not know why exception errors are occurring.
I write down the condition below.
Please help me!

=========
A program built in .NET4.0 calls SQL Anywhere API.

[Windows7 Professional]
Method not found: 'IntPtr System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(!!0)'

[Windows8.1 Enterprise Evaluation version]
An error occurred: 'The type initializer of Sap.Data.SQLAnywhere.SAConnection threw an exception.'

[Windows10 IOT]
There is no problem.
=========

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member

I think that SAP are testing .NET driver on 4.5.2. Because .NET 4.5 is gone. 4.5.1 too.

https://support.microsoft.com/en-us/lifecycle/search?alpha=.NET%204.5

No reason to use old one.

-Raful

Former Member
0 Kudos

Thank you for the information.

Since it is supported from .NET 4.5.2, it seems good to understand that it happens to work in .NET 4.5.1.

Former Member
0 Kudos

After that, when I investigated the execution environment, I found that there is no problem in .NET version 4.5.1 and later versions.

However, why there is no problem with .NET 4.5.1, I do not know if there is a problem with .NET 4.5.
Is there anyone who is an expert in this event?

Former Member
0 Kudos

Endou さん
返答ありがとうございます。
ご質問に回答します。

SQL Anywareバージョン:17.0.7.33824
プログラムコード:
SAConnection myConnection = new SAConnection();
myConnection.ConnectionString = "Data Source=xxx;UID=xxx;PWD=xxx;InitString=\"SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=xxx;Application=xxx;Signature=xxx'\"";
myConnection.Open();
※パスワードなどの秘密情報は伏字にしています。
実行環境:.NET 4.5

-------------------------------------------

Endou san,
Thank you for your response.
We will reply to your questions.

SQL Anyware Version:17.0.7.33824
Program Code:
SAConnection myConnection = new SAConnection();
myConnection.ConnectionString = "Data Source=xxx;UID=xxx;PWD=xxx;InitString=\"SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=xxx;Application=xxx;Signature=xxx'\"";
myConnection.Open(); (<- An exception error occurs.)
(*)Confidential information such as password is oblivious.
Execution environment:.NET 4.5

Former Member
0 Kudos

こういうのは使っているバージョン(17.x.x)と、そのコードをコピペしないと ......

You should write product version (17.x.x) and You should write problem codes.