本文介绍了在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数据库数据类型
发布评论