C # Connection Firebird method

Source: Internet
Author: User
Tags firebird database

Firebird data Provider for. NET Connection Firebird Database file
    1. Download Firebird Embedded database: FIREBIRD-2.5.0.25920-0_WIN32_EMBED_PDB_RC2 (zip format, 8.5MB) extract to Local disk, no installation required.
    2. Create a database with Visual Database management tools: Firebird's database management tools have many, I use the Ibmanager, only one EXE file, free installation.
    3. The directory where the metabase files are located: Copy all the contents of files Firebird.msg and Intl, UDF two subdirectories from the 1th step to the directory where the database files are placed. Note: Database files can be placed on any accessible directory, not the same directory as the application.
    4. Configure the application directory: from the 1th step extracted from the directory under the copy file below 6 files to the application directory: Fbembed.dll, firebird.conf, Ib_util.dll, Icudt30.dll, Icuin30.dll, Icuuc30.dll.
    5. DLL referencing Firebird. NET Provider: First download firebird.net Provider v2.5.1 (zip format, 200KB), unzip, will be FIREBIRDSQL.DATA.FIREBIRDCLIENT.D ll add references to the project.
    6. Connection: The individual can not remember the connection string, directly using Fbconnectionstringbuilder to create the connection string, the code is as follows:
    7. The user name is specified as: SYSDBA, otherwise an exception with insufficient permissions may be thrown.
Connection code
usingFirebirdSql.Data.FirebirdClient; Fbconnectionstringbuilder Connbuilder=NewFbconnectionstringbuilder (); Connbuilder.userid= "SYSDBA";//sets a value that the embedded version does not validate the user name. Connbuilder.servertype = fbservertype.embedded;//set the database type to embedded;Connbuilder.database = DBFile;//directory of database files;using(Fbconnection Fbconn =Newfbconnection (connbuilder.connectionstring))    {Fbconn.open (); Console.WriteLine ("Connection Successful! "); Fbconn.close (); }

C # Connection Firebird method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.