Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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.
C#
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;
		}

How can i change it to Sql

Anybody can please help me out this issue.

Regards
KishoreD
Posted
Updated 28-Aug-12 0:17am
v5

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.
 
Share this answer
 
No, we can't.
Why?
Look at those "IODDALConstants". They are specific of your company's code - nobody else uses them.
 
Share this answer
 
Comments
D-Kishore 27-Jul-12 7:24am    
yes i understood that, but my question is like, in the above code they are using Oracletype.Cursor so what we can write to convert sql sqldbtype."-----"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900