在C#.net中将Oracle数据库数据类型迁移到Sql数据库数据类型

编程入门 行业动态 更新时间:2024-10-25 14:30:53
本文介绍了在C#中将Oracle数据库数据类型迁移到Sql数据库数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

早上好, 在这里,我们需要将qracle数据库迁移到sql server. 在这里,我们正在使用c#应用程序. 下面给出了Oracle的sapmle代码.

Hi Good morning , Here we need to migrating the qracle databse to sql server. here we are using c# applicaion. sapmle code for Oracle given below.

public DataSet GetL3CompanyDesc() { DataSet dsCompanyDetails = new DataSet(); try { oracleConnection = new OracleConnection(connectionString); OracleParameter[] arrayParameter = new OracleParameter[2]; arrayParameter[0] = new OracleParameter(IODDALConstants.GetL3CompanyDescRefCur, OracleType.Cursor); arrayParameter[0].Direction = ParameterDirection.Output; arrayParameter[1] = new OracleParameter(IODDALConstants.GetL3CompanyDescCubeVersion, OracleType.Cursor); arrayParameter[1].Direction = ParameterDirection.Output; OracleHelper.FillDataset(oracleConnection, CommandType.StoredProcedure, IODDALConstants.GetL3CompanyDesc, dsCompanyDetails, new string[] { IODDALConstants.GetL3CompanyDescTableName }, arrayParameter); } catch (Exception ex) { bool rethrow = ExceptionLogEntry.HandleDALException(ex); if (rethrow) { throw; } } finally { if (oracleConnection != null) oracleConnection.Dispose(); } return dsCompanyDetails; }

如何将其更改为Sql 任何人都可以帮我解决这个问题. 问候 KishoreD

How can i change it to Sql Anybody can please help me out this issue. Regards KishoreD

推荐答案

我们已经更改了存储过程,就像没有将游标作为输出参数传递一样. 因此,在我们的C#代码中,无需将任何参数传递给sql存储过程. we have changed the stored procedure like with out passing a cursor as a output parameter. hence, in our c# code no need to pass any parameters to the sql stored procedure.

不,我们不能. 为什么? 查看那些"IODDALConstants".它们特定于您公司的代码-没有其他人使用它们. No, we can''t. Why? Look at those "IODDALConstants". They are specific of your company''s code - nobody else uses them.

更多推荐

在C#.net中将Oracle数据库数据类型迁移到Sql数据库数据类型

本文发布于:2023-10-27 15:27:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533786.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据类型   数据库   中将   net   Sql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!