Firebird 问题总结

 

 

1. 连接字符串问题(“initial catalog” 的内容必须是绝对路径,不能是相对路径)

01:  <connectionStrings>
02:      <add providerName ="FirebirdSql.Data.FirebirdClient" name="NumericDB" connectionString="data source=localhost;initial catalog=NULLABLETYPESDB.GDB;"/>
03:    </connectionStrings>
04:    <system.data>
05:      <DbProviderFactories>
06:        <clear/>
07:        <add name="FirebirdSql.Data.FirebirdClient"
08:             invariant="FirebirdSql.Data.FirebirdClient"
09:             description="ddd"
10:             type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory,FirebirdSql.Data.FirebirdClient"/>
11:      </DbProviderFactories>
12:  
13:    </system.data>
14:  

2. 数据库区分大小写(表名、列名严格区分大小写)

3.  数据库中没有自动增长列,创建自动增长列需要在Generactors 下,建立一个生成器,并设置初始值为0或1,或其它数字,然后创建触发器 

       例如:有个表A,表A中有个字段Id,我需要设置该字段为自动增长列实现步骤如下:
           (1):在Generactors 下,建立一个生成器,并设置初始值为0或1
                 create generator gen_A
                 set generator gen_A to 0
                 ☆:注意这两个语句不能同时执行,需单个执行
           (2)创建触发器:点Triggers
                reate trigger trig_A_Id for A
                 active before insert position 0
                as
                begin
                   new.id=gen_id(gen_A,1);
                end

4. Firebird分页

select first 10 templateid,code,name from template ;
select first 10 skip 10 templateid,code,name from template ;
select * from shop rows 1 to 10; --firebird2.0支持这种写法

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值