Parzival | 25 May 17:08 2015
Picon
Picon

EF 6.0 use context.Database.Connection

Hello,

 

the EF integration with Firebird works quiet well for standard insert, update, delete and search.

 

I have still some problems arrond Stored Procedures. For that reason I keep using the .net Provider functionality with fbConnection, fbCommand etc.

 

Is it ok to use the connection of the EF context for this purpose?

 

Cast it to (fbConnection)Context.Database.Connection

 

Or is there a problem by doing that?

 

Thanks

 

Niko

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Simon Carter (JIRA | 20 May 18:25 2015

[FB-Tracker] Created: (DNET-607) Pooling clears current active connections

Pooling clears current active connections
-----------------------------------------

                 Key: DNET-607
                 URL: http://tracker.firebirdsql.org/browse/DNET-607
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 4.6.2.0
         Environment: Windows 8
Visual Studio Pro 2013
Firebird 2.5.2
            Reporter: Simon Carter
            Assignee: Jiri Cincura

The following method within FbConnectionPoolManager.cs

public void CleanupPool()
{
	lock (_syncRoot)
	{
		CheckDisposedImpl();
		var now = DateTimeOffset.UtcNow;
		var available = _available.ToArray();
		var keep = available.Where(x => IsAlive(_connectionString.ConnectionLifeTime, x.Created, now)).ToArray();

		var keepCount = keep.Count();

		if (keepCount < _connectionString.MinPoolSize)
			keep = available.Except(keep).Take(_connectionString.MinPoolSize - keepCount).ToArray();

		var release = available.Except(keep).ToArray();
		release.AsParallel().ForAll(x => x.Dispose());
		_available = new Queue<Item>(keep);
 		}
	}
}

The line keep = available.Except(keep).Take(_connectionString.MinPoolSize -
keepCount).ToArray(); will always clear existing connections when the number of connections is less
than the Minimum Pool Size.

By removing the following lines, all works as expected:

		var keepCount = keep.Count();

		if (keepCount < _connectionString.MinPoolSize)
			keep = available.Except(keep).Take(_connectionString.MinPoolSize - keepCount).ToArray();

Also the Take(_connectionString.MinPoolSize - keepCount) only takes account of the min pool size and not
the maximum, so "other" connections above min pool size could also be lost at this point

The following is my connection
string:

User=USERNAME;Password=password;Database=DBName.fdb;DataSource=127.0.0.1;Dialect=3;MinPoolSize=20;MaxPoolSize=150;Pooling=True;Connection
lifetime=0;Packet Size=8192;CharSet=UTF8

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
William Johnson | 19 May 15:10 2015

Re: Deployment for EF6 + Firebird

A solution which worked for me was to install the NuGet package for the provider into the Visual Studio project.
It will create a References item to a project local packaged dll that is included with the deployed files.
Previously, I had the msi installed provider which was only resolved on my development machine.

+BillJ

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
david | 19 May 10:17 2015

Re: Firebird-net-provider Digest, Vol 109, Issue 7

Sorry I missed you e-mail but I'm currently on leave. I will return to the office on Monday the 25th of May

For all support inquiries please contact the office on +353 (0)1 5253600 or +44 (0)203 4681247 

Alternatively please email support@... .

 Kind Regards,
 David

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Parzival | 18 May 21:49 2015
Picon
Picon

Deployment for EF6 + Firebird .net Application

Hello,

 

I am working for some time now with EF 6.0 and Firebird (after using Firebird for long time with ODBC etc.).

 

When it comes to deploying the app I am facing an interessting problem. It runs fine on the development box, but not in VMWare or other PC. The error claims that the FirebirdSql.Data.FirebirdClient is missing – which is sitting next to the app.exe.

 

Do you have an idea what could be missing here?

 

Thanks

 

Niko

 

 

Following files are part of the xcopy installation:

echolot.exe

echolot.exe.config

echolotdataaccess.dll (Contains the C# entity framework context)

EntityFramework.dll

EntityFrameworkFirebird.dll

FirebirdSql.Data.Firebird.Client.dll

 

The config file contains following items:

 

  <configSections>

    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->

    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >

      <section name="Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

    </sectionGroup>

  </configSections>

  <entityFramework>

    <defaultConnectionFactory type="FirebirdSql.Data.EntityFramework6.FbConnectionFactory, EntityFramework.Firebird" />

    <providers>

      <provider invariantName="FirebirdSql.Data.FirebirdClient" type="FirebirdSql.Data.EntityFramework6.FbProviderServices, EntityFramework.Firebird" />

    </providers>

  </entityFramework>

 

The app starts and at the first time I want to query data

 

  public IEnumerable GetMaerkte()

        {

            var result = from s in this.ECHOLOT_MAERKTE select new {s.MARKT};

            return result.ToList();

        }

 

I receive following errormessage:

System.ArgumentException: The ADO.NET provider with invariant name 'FirebirdSql.Data.FirebirdClient' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Jiri Cincura (JIRA | 8 May 09:04 2015

[FB-Tracker] Created: (DNET-606) Show unknown statement in FbBatchExecution

Show unknown statement in FbBatchExecution
------------------------------------------

                 Key: DNET-606
                 URL: http://tracker.firebirdsql.org/browse/DNET-606
             Project: .NET Data provider
          Issue Type: Improvement
          Components: ADO.NET Provider
    Affects Versions: 4.6.2.0
            Reporter: Jiri Cincura
            Assignee: Jiri Cincura

The "throw new ArgumentException("The type of the SQL statement could not be determined.");" could also
show the statement.

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Brian Liedtke | 3 May 03:44 2015

Help generating an EDMX on EF6

Hey all,
 
I’ve been beating my head against the wall this past week trying to get this solved.
After reading Jiri’s blog on upgrading to EF6 and going through the email archives,
I haven’t found a solution. After trying everything I can think of I am out of ideas.
 
Here what is happening. I am trying to upgrade to EF6. Everything looks good on the install.
I can build and run but when I try to generate an EDMX, I get the following error.
 
 
Environment is:
OS: Windows 8.1
Visual Studio 2013 Version 12.0.31101.00 Update 4
.Net Provider 4.6.2.0
DDEX 3.0.1.0
.Net Framework 4.5.1
Language C#
Firebird embedded server
 
And yes, I have removed all bin and obj directories and then do a clean build.
I can then run the application with no problems.
 
I first removed the old .NET Provider from the GAC and uninstalled it.
I then installed the latest and greatest .NET provider through NuGet in Visual Studio.
install-package EntityFramework
install-package EntityFramework.Firebird
update-package
 
 
The app.config file for the main project is also shown.
 
I can setup and view a data connection through the server explorer. So I believe I have the DDEX working.
 
 
Since I didn’t get the EDMX to generate. I heeded Jiri’s comment on his blog
to make sure that the DDEX is using the same FirebirdClient as the project and
added the new provider to the GAC.
 
 
The machine.config file for both 32 and 64 bit have the following entry.
 
 
I have run both versions of the DbProviderFactories  FirebirdClient Data Provider entry with the same result.
 
I then checked to see if there were any other versions of FirebirdSql.Data.FirebirdClient on my system.
 
 
Nope. Only the libraries in the GAC and the project’s packages directory.
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\FirebirdSql.Data.FirebirdClient\v4.0_4.6.2.0__3750abcc3150b00c
C:\Users\liedtke\Documents\Visual Studio 2013\Projects\MyGen\packages\FirebirdSql.Data.FirebirdClient.4.6.2.0\lib\net40-client
C:\Users\liedtke\Documents\Visual Studio 2013\Projects\MyGen\packages\FirebirdSql.Data.FirebirdClient.4.6.2.0\lib\net45
 
The one in the GAC is the net45 library. (See above)
 
So, either I have missed a something (probably in a config file), or there is a bug. I lean toward the former.
 
Thanks in advance,
Brian
 
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Maxim (JIRA | 29 Apr 09:16 2015

[FB-Tracker] Created: (DNET-605) NullReferenceException in FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated()

NullReferenceException in FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated()
---------------------------------------------------------------------------------------------------

                 Key: DNET-605
                 URL: http://tracker.firebirdsql.org/browse/DNET-605
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 4.6.2.0
         Environment: IDE: Visual studio communiti 2013. Framework: C# .Net 4.0. Platform: Windows Server 2012
x64. Server: Firebird Embedded 2.5.4 x64.
            Reporter: Maxim
            Assignee: Jiri Cincura

Hi all.
First, sorry by my english, not native laguage.
Have the problem with x64 ADO.NET Provider.
In operations of adding, changing and deleting data in tables the program throwing exception NullReferenceException.

Exception stack:
   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.TransactionUpdated()
   at FirebirdSql.Data.FirebirdClient.FbTransaction.UpdateTransaction()
   at FirebirdSql.Data.FirebirdClient.FbTransaction.Commit()
   at FirebirdSql.Data.FirebirdClient.FbCommand.CommitImplicitTransaction()
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
   at *myMethod*

For example adding method:
                if (dbConnect.State != ConnectionState.Open)
                    dbConnect.Open();
                FbCommand findClientCom = new FbCommand("Select ID FROM CLIENTS WHERE ID='" + ID.ToString() + "'", dbConnect);
                FbDataAdapter FDA = new FbDataAdapter(findClientCom);
                DataSet ds = new DataSet();
                int count = FDA.Fill(ds);
                if (count > 0)
                {
                    errStr = "This Client is present";
                    return false;
                }
                String insertText =  <at> "INSERT INTO CLIENTS (ID, NET_ID, NAME, LOGIN, PASSWORD, RES_PU, RES_KP, CLUSTER)";
                insertText +=  <at> " VALUES( <at> ID,  <at> NET_ID,  <at> NAME,  <at> LOGIN,  <at> PASSWORD,  <at> RES_PU,  <at> RES_KP,  <at> CLUSTER)";
                FbCommand insertCom = new FbCommand(insertText, dbConnect);
                insertCom.Parameters.AddWithValue(" <at> ID", ID.ToString());
                insertCom.Parameters.AddWithValue(" <at> NET_ID", net_id.ToString());
                insertCom.Parameters.AddWithValue(" <at> NAME", name);
                insertCom.Parameters.AddWithValue(" <at> LOGIN", login);
                insertCom.Parameters.AddWithValue(" <at> PASSWORD", password);
                insertCom.Parameters.AddWithValue(" <at> RES_PU", res_pu);
                insertCom.Parameters.AddWithValue(" <at> RES_KP", res_kp);
                insertCom.Parameters.AddWithValue(" <at> CLUSTER", cluster.ToString());
                insertCom.ExecuteNonQuery();
                errStr = "Client " + VikingServer.ushortToStr(ID) + " was added";
                return true;
            }
            catch (Exception ex)
            {
                errStr = ex.ToString();
                return false;
            }

My methods are working stable on 32 platform. On x64 tables are changing, but after change i have this exception.

Please help me with this problem.

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Pascal (JIRA | 24 Apr 14:41 2015

[FB-Tracker] Created: (DNET-604) Improvement the time to execute parametred queries

Improvement the time to execute parametred queries
--------------------------------------------------

                 Key: DNET-604
                 URL: http://tracker.firebirdsql.org/browse/DNET-604
             Project: .NET Data provider
          Issue Type: Improvement
          Components: ADO.NET Provider
    Affects Versions: 4.6.2.0
            Reporter: Pascal
            Assignee: Jiri Cincura

When FirebirdSql.Data.FirebirdClient is used to insert a lot of records in a table using parametred
query, it's possible to gain time in the FbCommand.UpdateParameterValues :

Change this code :
  for (int i = 0; i < this.statement.Parameters.Count; i++)
            {
                index = i;

                if (this.namedParameters.Count > 0)
                {
                        index = this.Parameters.IndexOf(this.namedParameters[i]);
                        if (index == -1)
                        {
                            throw new FbException(String.Format("Must declare the variable '{0}'", this.namedParameters[i]));
                        }
                }

by this one :
  for (int i = 0; i < this.statement.Parameters.Count; i++)
            {
                index = i;

                if (this.namedParameters.Count > 0)
                {
                    if (this.Parameters[i].ParameterName != this.namedParameters[i]) // Added by webpac
                    {
                        index = this.Parameters.IndexOf(this.namedParameters[i]);
                        if (index == -1)
                        {
                            throw new FbException(String.Format("Must declare the variable '{0}'", this.namedParameters[i]));
                        }
                    }
                }

And then, if the namedParamers[i] is the same then Parameters[i], it doesn't looking for all nameParameters.

I tried to insert 1000 records with 50 parameters, without the optimisation, it dures 10 seconds and with
the optimisation it dures 7 seconds.

Regards,

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Wolfgang Janz (JIRA | 22 Apr 10:13 2015

[FB-Tracker] Created: (DNET-603) operating system directive CreateFile failed

operating system directive CreateFile failed
--------------------------------------------

                 Key: DNET-603
                 URL: http://tracker.firebirdsql.org/browse/DNET-603
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 4.5.2.0
            Reporter: Wolfgang Janz
            Assignee: Jiri Cincura

we are recently getting an error when using firebird (filebased-database). Here is the stacktrace:

FirebirdSql.Data.FirebirdClient.FbException: operating system directive CreateFile failed --->
FirebirdSql.Data.Common.IscException: operating system directive CreateFile failed
bei FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector(IntPtr[] statusVector) in
c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\Client\Native\FesDatabase.cs:Zeile 420.
bei FirebirdSql.Data.Client.Native.FesDatabase.Attach(DatabaseParameterBuffer dpb, String
dataSource, Int32 port, String database) in
c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\Client\Native\FesDatabase.cs:Zeile 291.
bei FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect() in
c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionInternal.cs:Zeile 191.
— Ende der internen Ausnahmestapelüberwachung —
bei FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect() in
c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionInternal.cs:Zeile 196.
bei FirebirdSql.Data.FirebirdClient.FbConnection.Open() in
c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnection.cs:Zeile 539.
bei NHibernate.Connection.DriverConnectionProvider.GetConnection()

 Do you have any ideas why this happens? The file is available. The problem just accrues recently without any
changes in the source.

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Jiri Cincura (JIRA | 19 Apr 09:31 2015

[FB-Tracker] Created: (DNET-602) Some unit tests for FbTrace

Some unit tests for FbTrace
---------------------------

                 Key: DNET-602
                 URL: http://tracker.firebirdsql.org/browse/DNET-602
             Project: .NET Data provider
          Issue Type: Task
          Components: ADO.NET Provider
    Affects Versions: 4.6.2.0
            Reporter: Jiri Cincura
            Assignee: Jiri Cincura
            Priority: Minor

--

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF

Gmane