Page 1 of 1

.NET 64-bit exception

Posted: Wed 16 Mar 2011 23:01
by hsldev
Hi,

We have found an issue using the SDAC .NET DLLs when referenced in a visual studio 2010 (.NET 3.5) project that has a target platform of 64-bit.

The exception is
"System.OverflowException: Arithmetic operation resulted in an overflow."
It appears this was raised in the below post but no solution was added.
http://www.devart.com/forums/viewtopic. ... e6a8be1f3e

We are using version 4.35.1.5016 of the SDAC components but I downloaded the latest trial version (5.x) and the same exception occurred.

I have a very basic demo project that I'm happy to send you, but it basically looks like this...

Code: Select all

using System;
using CoreLab.Sdac;

namespace DevArtSdacTest
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Console.Write("Please enter the database server: ");
                string server = Console.ReadLine();

                TMSConnection c = new TMSConnection(null);
                c.Authentication = TMSAuthentication.auWindows;
                c.Server = server;
                c.Database = "master";
                c.Connect();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            Console.ReadLine();
        }
    }
}
Any help would be greatly appreciated!

Regards,

Posted: Thu 17 Mar 2011 10:39
by AndreyZ
Hello,

Please send your demo project to andreyz*devart*com.

Posted: Fri 18 Mar 2011 13:44
by AndreyZ
SDAC is written using Delphi and Delphi doesn't support x64 platform. That's why you can use SDAC in Visual Studio only if you work with x86 platform. We will consider adding x64 support only when Delphi supports it.
Maybe you will be interested in our .NET data provider for SQL Server - dotConnect for SQL Server. You can find more information about dotConnect for SQL Server here: http://www.devart.com/dotconnect/sqlserver

Posted: Sun 20 Mar 2011 22:39
by hsldev
Hi,

Thanks for the prompt reply, though I must say I don't fully agree with your answer.

I created my code sample to very simply describe the issues we are having with our product in trying to use Delphi 2007 .NET DLLs (that use SDAC) with a VS 2010 project, but perhaps by trying to oversimplify my example I made it a little misleading.

I was able to duplicate my example as a Delphi 2007 .NET console application and setting the target platform as x64 was again able to get the overflow exception. I can email you this code sample as well if you like?

I realize that Delphi itself does not have a 64-bit compiler, but by virtue of Delphi 2007 being able to dual compile code in Win32 and/or .NET, and .NET projects being able to target 32-bit or 64-bit platforms, Delphi does indirectly support x64 and I believe supporting 3rd party components should as well.

Regards,

Posted: Wed 23 Mar 2011 09:08
by AndreyZ
For the time being you can use SDAC only for creating x86 applications. We will support x64 platform only when Delphi officialy supports it. Also please consider using dotConnect for SQL Server. With it you will be able to create both x86 and x64 applications.

Posted: Fri 25 Mar 2011 06:31
by hsldev
dotConnect sounds great but that isn't going to help us with our 10,000 line delphi library (using SDAC) that we aren't going to be rewriting any time soon.

We need this library for our win32 application and now we wish to use it with a 64-bit .NET application which doesn't sound unreasonable given delphi can produce "Any CPU" or even "x64" IL for .NET.

The .NET SDAC libraries must be compiled with a target of "Any CPU" otherwise the 64-bit application would fail trying to bind the DLLs. Perhaps you should specify the .NET SDAC libraries with a target of "x86" if you aren't going to support 64-bit so that there can be no confusion.

Regards,

Posted: Mon 28 Mar 2011 09:53
by AndreyZ
We will change target platform to "x86". We will also investigate this problem thoroughly to find the way of working with the x64 platform.

Re: .NET 64-bit exception

Posted: Tue 05 Feb 2013 23:09
by hsldev
Hi,

I am revisiting this issue now as we are at a point where we really need our product to support 64-bit.

I was encouraged to see that the latest version of SDAC 6.6 supported 64 bit and was hoping this didn't just refer to support for Win32 but alas it appears to be, because testing 6.6 under the same scenarios i did above over a year ago produced the same result.

Are you please able to confirm this is the case and if there are any plans to support this at some time?

Regards,

Re: .NET 64-bit exception

Posted: Thu 07 Feb 2013 15:48
by AndreyZ
We have thoroughly investigated this question. We will try to fix this problem, but as it requires a lot of changes, we cannot provide any time-frame for when it will be resolved. For the time being, we have tasks of higher priority.

Re: .NET 64-bit exception

Posted: Thu 14 Feb 2013 09:36
by AndreyZ
We have fixed this problem. This fix will be included in the next SDAC build. We plan to release a new SDAC build today or tomorrow.