firebird 数据库使用笔记



C:\Users\Administrator>cd  D:\Program Files\Firebird\Firebird_2_5\bin
C:\Users\Administrator>d:
D:\Program Files\Firebird\Firebird_2_5\bin>isql -user sysdba -password masterkey
;
Use CONNECT or CREATE DATABASE to specify a database

SQL>

输入账号密码进入数据库

SQL> connect 'D:\firdbird\DB\test.fdb';
Database:  'D:\firdbird\DB\test.fdb', User: sysdba
SQL>


成功进入数据库



odbc配置


有些引用fbclient.dll   但我从来没成功过 报错Unable to connect to data source: library 'fbclient.dll' failed to load

找了很久 最后从官方文档上找到 红色部分 果断从system32中找到gds32.dll  ok成功了 

Are used to define the connection parameters to a database. The dialog box contains the parameters that correspond to the connection attributes

Data Source Name (DSN)

Required.
Unique name of Server Type
Example: “Connect from FbEmbed” or “ConnectFbServer”

Description

Not Required.
A more detailed description of the data source.

Driver

Required.
Always: IscDbc

Database

Required.
Specify the location of a database, locally, remotely or via an alias.
See examples

Client

Required when using the embedded Server Allows you to specify a command line to start the Firebird embedded database(fbembed) or Firebird SQL client (gds32,fbclient).

Database Account

Not Required.
The user name to be used when connecting to a Firebird database. If not used, ODBC will prompt you for a user ID (UID or USER) when connecting to the data source.

Password

Not Required.
The password to be used with the User ID when connecting to a Firebird database. If not used, ODBC will prompt you for a password ( PWD or PASSWORD ) when connecting to the data source. If used the password is automatically encrypted and saved in odbc.ini. Setting the password here should not be a security risk.

Role

Not Required.
Rules:
1. If defined, but login is SYSDBA, role ignored is used.
2. If defined, and login is not SYSDBA, login ignored is used.

Character Set

Not Required.
Set the default character set.

Options

  • Transaction
    Specify a transaction type when connecting to a Firebird database
    • Read (default write)
      Write: Access the database in Read/Write mode.
      Read: Access the database in Read Only mode.

      Nowait (default wait)
      Wait: The transaction will wait if it encounters a lock conflict.
      Nowait: The transaction will immediately return an error if it encounters a lock conflict.

    Dialect

    Typically 1 or 3, SQL dialects were introduced in InterBase 6.0, to support a number of new SQL features including delimted identifiers. Valid dialects are:

    • 1 - Parser processes as it did in InterBase V5.
      2 - Transitional flagger. InterBaseV6, and Firebird flags ambiguous SQL constructs and issues an error or warning message.
      3 - Parser processes anything delimited by single quotes as string constants and any thing delimited by double quotes as SQL delimited identifiers

    Quoted Identifier

    This option ensures compatibility with databases created in dialect 1

    Sensitive Identifier

    This option changes the property of SQL_IDENTIFIER_CASE (Default SQL_IC_UPPER, select SQL_IC_UPPER or SQL_IC_SENSITIVE)

    Autoquoted Identifier

    default NO (select YES or NO)
    Should change from

    • SELECT A.Test_Field FROM Mixed_Caps_Table A
      ORDER BY A.Test_Field
    to
    • SELECT A."Test_Field" FROM "Mixed_Caps_Table" A
      ORDER BY A."Test_Field"
    Note: If the following is used then the conversion will be wrong.
    Change from
    • Select A.Test_Field From Mixed_Caps_Table A
      Order By A.Test_Field
    to
    • "Select" A."Test_Field" "From" "Mixed_Caps_Table" A
      "Order" "By" A."Test_Field"



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值