FirebirdSql.Data.FirebirdClient | Firebird ADO.NET Data Provider | Object-Relational Mapping library
kandi X-RAY | FirebirdSql.Data.FirebirdClient Summary
kandi X-RAY | FirebirdSql.Data.FirebirdClient Summary
Firebird ADO.NET Data Provider
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FirebirdSql.Data.FirebirdClient
FirebirdSql.Data.FirebirdClient Key Features
FirebirdSql.Data.FirebirdClient Examples and Code Snippets
Community Discussions
Trending Discussions on FirebirdSql.Data.FirebirdClient
QUESTION
I want to develop a demo project in ASP.NET Core MVC with embedded Firebird v2.5. I read Firebird connection string information from a text file. Because I will change database in project presentation thus I must read from a text file. Or what is the your idea?
In this project I create a DbContext
file and I fill in the database information using this class:
ANSWER
Answered 2022-Feb-01 at 12:47You are not using Firebird Embedded. As you specified FbServerType.Default
(which is also the default value), you are connecting through a normal Firebird server using TCP/IP, and the error indicates that the database file does not exist (or possibly that the Firebird server process does not have sufficient access rights to open the file).
If you really want to use Firebird Embedded (which personally I think is not a good idea for a server application), you need to specify FbServerType.Embedded
. Also make sure that the database file actually exists at C:\Firma\BlinePalmeWEB\Mandanten\11PalmeIT\GDI21.FDB
on the server specified by dataSource
.
QUESTION
I had to switch my code from being in .NET Core to .NET Framework and now I get an error. the error says that local variable named 'listadb' cannot be declared in this scope. This function worked before and I don't know how to get around it now. Here is the code:
...ANSWER
Answered 2021-Oct-28 at 11:36QUESTION
I have this program, that I have to handle the exceptions for, but I never done it so I'm kind of confused. I'm guessing I'd have to handle exceptions like the value in the textfile is empty, there is no index, there is no "=" or the file is empty, but I don't really know how to define them or where to put them. Here is my code: (the lines in the text file should look like this: EMPIS_MAG_BUDOW=12
EMPIS_DESKA_FASOLKA=2
SM_PORTAL_POL1=-4 )
...ANSWER
Answered 2021-Oct-21 at 07:18//try something like below.
QUESTION
I have to make a select statement on a database and than compare the results with a text file using only C# in Visual Studio. If the text file has a bigger value than the record in the database, the program returns the value from the text file, and if the database record has a bigger value, the program returns the value from the database. The results are added to a list being a class WynikPorownania{}. The user types in the file an index of a product and the value(in this case the value is it's availability condition).
For example:
The textfile says this:
WYR_WR_CZ1=12
VIDIS_JIMU_BOX=3
REREK_KOTEK_T=5
In the database, theses indexes are connected to an availability condition like this
WYR_WR_CZ1=-1.0000
VIDIS_JIMU_BOX=-13.0000
REREK_KOTEK_T=0.0000
Now the program should return the bigger value in a list being the WynikPorownania{} class.
For now, I managed to do this much: I took every record from the select query and put it in to a list as a class. I have a function that checks the "standysp"(availability condition) for a specified index, and I asigned the text file value to a string. I think that it could be done maybe with this "zwr" function and maybe a loop but I don't really know where to go from now on. This is my code for now:
...ANSWER
Answered 2021-Oct-20 at 10:13You mean something like this?
QUESTION
I recently downloaded the new Firebird 4 server and installed it. It's running as a service on my Windows 10 box. I'm able to connect to it just fine with the FB Maestro IDE, but when I try to connect to it from some ADO.NET code, I get an error. Upon calling await connection.OpenAsync
(where connection
is a FirebirdSql.Data.FirebirdClient.FbConnection
instance):
FirebirdSql.Data.Common.IscException: 'Error occurred during login, please check server firebird.log for details'
Looking at the server log, I see the following two errors, repeated various times:
DESKTOP-NAME Thu Jun 24 15:14:32 2021 Authentication error No matching plugins on server
DESKTOP-NAME Thu Jun 24 15:14:35 2021 INET/inet_error: read errno = 10054, client host = DESKTOP-NAME, address = 127.0.0.1/54653, user = Mason
I have no idea what this means, and some basic searching fails to turn up anything useful. Anyone know what I need to do to resolve this?
In case it's relevant, my connection string looks like this:
User=SYSDBA;Password=[my password];Database=[db name];DataSource=localhost;Port=3050;Dialect=3;Charset=UTF8;
Once again, I know the server is working correctly because I can connect to it with FB Maestro. The problem is clearly in my .NET code somewhere. I just have no idea where!
...ANSWER
Answered 2021-Jun-24 at 21:39The driver you use doesn't support srp256 and Firebird 4 server by default doesn't support anything else. You must edit firebird.conf changing AuthServer parameter to include srp plugin at least. Don't forget to restart the Firebird server afterward.
QUESTION
I have a pretty strange problem when trying to connect my C# program to an existing Firebird server.
First of all, this is reproducable with the default connection example from the Firebird documentation at https://github.com/FirebirdSQL/NETProvider/blob/master/Provider/docs/ado-net.md
...ANSWER
Answered 2021-Mar-11 at 12:26Thanks to Mark Rotteveel for the comment which got me to the solution.
I can connect with the default password "masterkey", so it is obvious that the srp user was created with the default credentials and therefore a connection with the other credentials is not possible.
I have to correct the users in my old server. Thanks for the hint that ADO.NET only supports srp.
QUESTION
I have a regression with a TCP\IP connection string post a firebird 3 migration from v2.5. The FirebirdClient version is 4.6.1 but I've tested with the latest stable version and it also doesn't work (v7.10.1).
The error message is "Your user name and password are not defined. Ask your database administrator to set up a Firebird login".
The stacktrace:
...ANSWER
Answered 2021-Mar-01 at 09:29Recent versions of FirebirdSql.Data.FirebirdClient support the version 13-15 wire protocol of Firebird 3, and then only support Srp authentication. Your old version supported only up to the v12 protocol (Firebird 2.5) and then would use the legacy authentication. If you created the user using the Legacy_UserManager (the default in your configuration), then you cannot authenticate with version 7.10.1 (where you could with 4.6.1), because as far as the Srp authentication plugin is concerned, the user does not exist.
It looks like you created the user either using gsec, which always applies the default user manager (FYI, gsec is deprecated since Firebird 3), or you used CREATE USER
without USING PLUGIN Srp
(or with USING PLUGIN Legacy_UserManager
). You can verify this by checking the output of select sec$user_name, sec$plugin from sec$users
. The solution would be to drop the user and then create it again with the right user manager (USING PLUGIN Srp
).
Note that in theory you could have the user both for Srp and Legacy_UserManager (e.g. if the same user needs to be used by an application that cannot authenticate with Srp), but it is far more secure to have the user only exist for one plugin.
On a related note, the configuration you have applied is insecure. It is far more secure to leave out Legacy_Auth
of the AuthServer
setting or - if you still have applications that cannot apply Srp - to put it last (for both AuthServer
and AuthClient
). Similarly, it is recommended to put Legacy_UserManager
last in UserManager
(or leave it out entirely), so by default - if you use gsec, or don't include USING PLUGIN xxx
in CREATE USER
- it will create more secure Srp-type users.
QUESTION
At the first glance, my problem seems to be quite trivial. I have to read data from Firebird's database, but this database was created by someone else. Raw binary data (like pictures) is stored in BLOB SUB_TYPE TEXT
instead of BLOB SUB_TYPE BINARY
and this is the problem, because Firebird ADO.NET Data Provider (FirebirdSql.Data.FirebirdClient 7.10.1) converts binary data to a string and I cannot find a proper method in this driver that returns binary data as a byte array from BLOB SUB_TYPE TEXT
.
I was trying to reverse binary data converted to a string by provider but without success. I use this provider in the following way (simplified example):
...ANSWER
Answered 2021-Feb-12 at 19:17As indicated in the comments by Charlieface, you can use reader.GetBytes
.
Alternatively, you can force Firebird to represent the type as binary by explicitly casting it:
QUESTION
I would like to update a list of rows given by a list of IDs. Normally, the parameters of the query can be passed via the parameter property. But if I pass a list of IDs, Firebird will not accept the query. I'm using the FirebirdSql.Data.FirebirdClient from NuGet.
Code (simplified):
...ANSWER
Answered 2020-Nov-13 at 17:27I got kind of around the problem by simply using a foreach loop to update all the rows:
QUESTION
I use FirebirdSql.Data.FirebirdClient to connect to a Firebird database (WPF desktop app).
Server Version: WI-V3.0.5.33220 Firebird 3.0, and ADO.net provider version is 7.5.0 (NuGet)
I created a user other than SYSDBA that only has read only access to the tables (only SELECT). Connecting with FlameRobin works without problems with this new user. However, when I specify this new user and corresponding read-only role in the FbConnectionStringBuilder class, I get a
"your username and password are not defined"
error. If I replace the new user by SYSDBA and corresponding password, the connection works.
...ANSWER
Answered 2020-Nov-11 at 14:56The problem is that, when connecting to Firebird 3, the Firebird ADO.net provider (FirebirdSql.Data.FirebirdClient) only supports the new SRP authentication plugin, not the Legacy_Auth authentication plugin. If your user is created using the Legacy_UserManager, then you cannot authenticate using the Firebird ADO.net provider. You need to create the user using Srp.
Depending on your exact Firebird config, you need to add Srp
to the UserManager
config list, and then create the user with:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FirebirdSql.Data.FirebirdClient
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page