在C#.net中将Oracle数据库数据类型迁移到Sql数据库数据类型 [英] Migrate Oracle database datatypes to Sql database datatypes in c# .net

查看:65
本文介绍了在C#.net中将Oracle数据库数据类型迁移到Sql数据库数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,

在这里,我们需要将qracle数据库迁移到sql server.
在这里,我们正在使用c#.net应用程序.

下面给出了Oracle的sapmle代码.

Hi Good morning ,

Here we need to migrating the qracle databse to sql server.
here we are using c#.net 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数据库数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆