Skip to Content

Exception Errors in SQL Anywhere 17 Deployment

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.
=========

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    May 25, 2017 at 03:40 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 22, 2017 at 04:05 AM

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • May 22, 2017 at 04:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2017 at 03:56 AM

    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?

    Add comment
    10|10000 characters needed characters exceeded