Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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;
		}
How can i change it to Sql
 
Anybody can please help me out this issue.
 
Regards
KishoreD
Posted 26-Jul-12 19:02pm
Edited 28-Aug-12 0:17am
v5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

No, we can't.
Why?
Look at those "IODDALConstants". They are specific of your company's code - nobody else uses them.
  Permalink  
Comments
kishore doni at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 28 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100