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支持这种写法

posted @   风云  阅读(779)  评论(1编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示