Topic
  • 6 replies
  • Latest Post - ‏2012-05-16T00:45:49Z by mferia
mferia
mferia
4 Posts

Pinned topic GET SQLCA In C# using informix.NET Driver

‏2012-05-14T14:07:10Z |
Hi.
Is there any way to get the structure of the SQLCA (SQL Communication Area) for a Informix connection.
I need to get the offset syntax error for executed statement, or is there another way to recover the position of the error using the informix driver. NET?
Thank you very much.
Updated on 2012-05-16T00:45:49Z at 2012-05-16T00:45:49Z by mferia
  • andreasl
    andreasl
    369 Posts

    Re: GET SQLCA In C# using informix.NET Driver

    ‏2012-05-15T10:03:21Z  
    This?

    Safe time by using the Search facility in Informix docs.

    Cheers,
    Andreas
  • mferia
    mferia
    4 Posts

    Re: GET SQLCA In C# using informix.NET Driver

    ‏2012-05-15T14:45:20Z  
    Hi andreasl.
    Thanks for the info, but this is for Genero language and I need for .NET
    I searched the Informix documentation and I have not really found anything that can help me check the SQLCA in C #.
    I have an application developed in Delphi which I want to migrate to. NET.
    In this application, consult the SQLCA through isqlt09b.dll I use the library.
    From what I read, the provider. NET really is a wrapper for ODBC libraries, which does not provide functionality to query the information from the SQLCA structure.
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: GET SQLCA In C# using informix.NET Driver

    ‏2012-05-15T15:48:55Z  
    • mferia
    • ‏2012-05-15T14:45:20Z
    Hi andreasl.
    Thanks for the info, but this is for Genero language and I need for .NET
    I searched the Informix documentation and I have not really found anything that can help me check the SQLCA in C #.
    I have an application developed in Delphi which I want to migrate to. NET.
    In this application, consult the SQLCA through isqlt09b.dll I use the library.
    From what I read, the provider. NET really is a wrapper for ODBC libraries, which does not provide functionality to query the information from the SQLCA structure.
    Hi,

    have you tried System.Runtime.InteropServices.DllImport?

    Below is example for ifx_putenv:
    public static extern int ifx_putenv(string value);

    Regards,

    Marion
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: GET SQLCA In C# using informix.NET Driver

    ‏2012-05-15T16:08:09Z  
    Hi,

    have you tried System.Runtime.InteropServices.DllImport?

    Below is example for ifx_putenv:
    public static extern int ifx_putenv(string value);

    Regards,

    Marion
    Sorry, copy+paste error.

    Here is the complete example:
    public static extern int ifx_putenv(string value);
  • SystemAdmin
    SystemAdmin
    1143 Posts

    Re: GET SQLCA In C# using informix.NET Driver

    ‏2012-05-15T16:13:28Z  
    Sorry, copy+paste error.

    Here is the complete example:
    public static extern int ifx_putenv(string value);
    I try it once more:
    The code always disappears, will omit the surrounding square brackets.

    System.Runtime.InteropServices.DllImport("isqlt09a", CharSet = System.Runtime.InteropServices.CharSet.Ansi, CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)
    public static extern int ifx_putenv(string value);
  • mferia
    mferia
    4 Posts

    Re: GET SQLCA In C# using informix.NET Driver

    ‏2012-05-16T00:45:49Z  
    I try it once more:
    The code always disappears, will omit the surrounding square brackets.

    System.Runtime.InteropServices.DllImport("isqlt09a", CharSet = System.Runtime.InteropServices.CharSet.Ansi, CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)
    public static extern int ifx_putenv(string value);
    I found in IBM.Data.Informix.dll the next function:
    SQLParseSqlcaADONET

    this is part of db2app.dll

    I will review it and I tell them the results.
    Still, if anyone has used it, would appreciate your comments.