After setting size of second parameter it throws null reference exception:

cmd.Parameters.Add("@str_val", FbDbType.VarChar, 20);

Provider seems to need some changes to be used with x64, my first test was 
very initial. However it works for some operations - it can create database, 
create table. So hopefully not too much changes are needed.

Sincerely yours,
Viatcheslav V. Vassiliev


----- Original Message ----- 
From: "Dean Harding" <[EMAIL PROTECTED]>
To: "For users and developers of the Firebird .NET providers" 
<firebird-net-provider@lists.sourceforge.net>
Sent: Friday, October 19, 2007 8:02 AM
Subject: Re: [Firebird-net-provider] Firebird ADO.Net on x64


> Viatcheslav Valerievitch Vassiliev wrote:
>> First tests of ADO.Net on Firebird 2.1 beta 2 for Win64 are successfull.
>> C# application runs in 64bit mode and executes simple actions
>> with embedded Firebird. (I rebuilt ADO.Net provider, without changes in
>> code for tests, may be official compilation will work too).
>
> That's not what I'm seeing actually. I'm getting memory corruption
> errors when running with the 64-bit fbembed.dll -- 32-bit works fine.
> I've tried it with three different version of the provider: 2.0.1, 2.1
> RC2 and 2.5 Alpha 1.
>
> I've created a small test program that demonstrates it, which you can
> download from here: http://codeka.com/tmp/FbEmbed64BitTest.zip
>
> Unzip that somewhere, copy the 32-bit and 64-bit fbembed.dll (and
> supporting DLLs) into the x86 and x64 folders respectively, then compile
> it in both the x86 and x64 configurations and you can see the difference.
>
> I get the following exception as soon as I try to execute any statements
> in the 64-bit build:
>
> System.BadImageFormatException: Invalid access to memory location.
> (Exception from HRESULT: 0x800703E6)
>    at
> System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
> errorCode, IntPtr errorInfo)
>    at System.Runtime.InteropServices.Marshal.FreeHGlobal(IntPtr hglobal)
>    at
> FirebirdSql.Data.Client.Common.XsqldaMarshaler.CleanUpNativeData(IntPtr&
> pNativeData)
>    at FirebirdSql.Data.Client.Native.FesStatement.DescribeParameters()
>    at
> FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior
> behavior, Boolean returnsSet)
>    at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
>    at FbEmbed64BitTest.Program.Main(String[] args) in
> D:\Projects\FbEmbed64BitTest\Program.cs:line 57
>
> (It's the "Invalid access to memory location." that worries me... I
> don't know why it's throwing a System.BadImageFormatException -- maybe
> that's a clue? -- but it's definitely loading the fbembed.dll
> successfully, because I can see other method calls into fbembed.dll
> working, it's only when it calls that XsqldaMarshaler.CleanUpNativeData
> that it has problems... perhaps some sort of memory corruption?)
>
> I don't know if the problem is specific to the .NET data provider, or if
> it's some bug in fbembed.dll itself, though...
>
> As an aside, I have also noticed that if I don't call
> FbConnection.ClearAllPools, my process never exits (you can see that
> happening in the sample project I posted above -- it doesn't call
> FbConnection.ClearAllPools() so the process hangs when it exits)
>
>> Will ADO.Net provider officially support x64 compilations?
>
> I would certainly hope so!! :-)
>
> Dean.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to