惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

博客园 - YiStudio

在Word中插入图片 DataGridView多列排序 将Word嵌入到自己的程序中 一个非常不错的压缩组件 免费的国产报表Grid++Reprot 使用NSIS制作安装包(2) 使用NSIS制作安装包(1) SharpDevelop2.0 用Marathon管理Firebird数据库(2) 用Firebird .NET Data Provider编写.NET应用程序(1) 用Marathon管理Firebird数据库(1) Firebird简介 NDoc修改手记(三) NDoc修改手记(二) NDoc修改手记(一) WebForm中将DataGrid中导出数据的方法 FxCop EXCEL2003中使用XML 动态加载类(动态加载DLL文件)
用Firebird .NET Data Provider编写.NET应用程序(2)
YiStudio · 2005-07-08 · via 博客园 - YiStudio

使用Firebird .NET Data Provider编写调用Firebird数据库的存储过程的方法如下:
    cn.Open();
    FirebirdSql.Data.Firebird.FbCommand cm=new FirebirdSql.Data.Firebird.FbCommand();
    cm.Connection=cn;
    cm.CommandType=System.Data.CommandType.StoredProcedure;
    cm.CommandText="SP_1_ADD";
    cm.Parameters.Add("@F1",FirebirdSql.Data.Firebird.FbDbType.Integer).Value=1;
    cm.Parameters.Add("@F2",FirebirdSql.Data.Firebird.FbDbType.Date).Value="2005-1-1";
    cm.Parameters.Add("@F3",FirebirdSql.Data.Firebird.FbDbType.VarChar,20).Value="SPTest";
    cm.ExecuteNonQuery();
    cn.Close();
另外,参数的添加还可以使用如下的方法
    FirebirdSql.Data.Firebird.FbParameter fp=new FirebirdSql.Data.Firebird.FbParameter("@F1",FirebirdSql.Data.Firebird.FbDbType.Integer);
    fp.Value=1;
    cm.Parameters.Add(fp);
但在使用如下代码 
    FirebirdSql.Data.Firebird.FbParameter fp1=new FirebirdSql.Data.Firebird.FbParameter();
    fp1.ParameterName="@F1";
    fp1.DbType=(System.Data.DbType)FirebirdSql.Data.Firebird.FbDbType.Integer;
    fp1.Value=1;
    cm.Parameters.Add(fp1); 
添加参数,在编译的时候没任何错误但在运行时会出现"Incorrect Guid value"的错误。这样的代码在调用SQL Server数据库中的存储过程是没有任何问题的,不知这是Firebird .NET Data Provider的一个BUG,还是另有原因呢?

posted on 2005-07-08 09:47  YiStudio  阅读(970)  评论()    收藏  举报