Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
GeneralRe: Managed C# Compiler question Pin
LongRange.Shooter13-Mar-03 10:53
LongRange.Shooter13-Mar-03 10:53 
GeneralRe: Managed C# Compiler question Pin
LongRange.Shooter19-Mar-03 10:29
LongRange.Shooter19-Mar-03 10:29 
QuestionSending commands between Windows applications? Pin
Kryal13-Mar-03 6:13
Kryal13-Mar-03 6:13 
AnswerRe: Sending commands between Windows applications? Pin
Davy Mitchell13-Mar-03 22:02
Davy Mitchell13-Mar-03 22:02 
QuestionHow to create global variables in C#? Pin
Vitaliy Vorontsov13-Mar-03 6:10
Vitaliy Vorontsov13-Mar-03 6:10 
AnswerRe: How to create global variables in C#? Pin
leppie13-Mar-03 6:36
leppie13-Mar-03 6:36 
AnswerRe: How to create global variables in C#? Pin
Xiangyang Liu 刘向阳13-Mar-03 6:40
Xiangyang Liu 刘向阳13-Mar-03 6:40 
AnswerRe: How to create global variables in C#? Pin
kaschimer13-Mar-03 6:40
kaschimer13-Mar-03 6:40 
AnswerRe: How to create global variables in C#? Pin
Robert Hinrichs13-Mar-03 7:45
Robert Hinrichs13-Mar-03 7:45 
GeneralRe: How to create global variables in C#? Pin
Jeff J13-Mar-03 8:16
Jeff J13-Mar-03 8:16 
AnswerRe: How to create global variables in C#? Pin
Adam Turner13-Mar-03 11:02
Adam Turner13-Mar-03 11:02 
QuestionHow to update a Windows Service Pin
Chris Hansson13-Mar-03 5:55
Chris Hansson13-Mar-03 5:55 
AnswerRe: How to update a Windows Service Pin
Xiangyang Liu 刘向阳13-Mar-03 6:27
Xiangyang Liu 刘向阳13-Mar-03 6:27 
GeneralDefault argument values Pin
Alexandru Savescu13-Mar-03 4:23
Alexandru Savescu13-Mar-03 4:23 
GeneralRe: Default argument values Pin
Daniel Turini13-Mar-03 4:45
Daniel Turini13-Mar-03 4:45 
GeneralRe: Default argument values Pin
Alexandru Savescu13-Mar-03 5:00
Alexandru Savescu13-Mar-03 5:00 
GeneralRe: Default argument values Pin
Daniel Turini13-Mar-03 5:17
Daniel Turini13-Mar-03 5:17 
GeneralRe: Default argument values Pin
Alexandru Savescu13-Mar-03 5:28
Alexandru Savescu13-Mar-03 5:28 
GeneralRe: Default argument values Pin
Andy Smith13-Mar-03 6:46
Andy Smith13-Mar-03 6:46 
GeneralRe: Default argument values Pin
Nick Parker13-Mar-03 8:22
protectorNick Parker13-Mar-03 8:22 
GeneralCasting userdefined parameter class Pin
Venkatraman12-Mar-03 20:18
Venkatraman12-Mar-03 20:18 
Can anyone point out me where i am wrong. The below code creates a user defined parameter object for a Command object in ADO.NET. I am just trying to type cast this parameter object with OracleParameter but i am getting invalid casting error.

Your help in this regard is highly appreciated.

Cheers
Blush | :O

Venkat


using System;
using System.Data;
namespace venkat
{
///
/// This class is used to store the parameter information for a
/// command or a stored procedure.
///

public sealed class SPParameter: MarshalByRefObject,IDbDataParameter, IDataParameter, ICloneable
{
#region Private fields
private int m_DataType;
private DbType m_dbType;
private ParameterDirection m_Direction;
private bool m_blnIsNullable;
private string m_strParamName;
private string m_strSourceColumn;
private DataRowVersion m_oDataRowVersion;
private object m_oValue;
private byte m_bytePrecision;
private byte m_byteScale;
private int m_intSize;
#endregion

#region Public Attributes/properties
public int DataType
{
get{
return m_DataType;
}
set
{
m_DataType = value;
}
}
public DbType DbType
{
get{return m_dbType;}
set{m_dbType = value;}
}

public ParameterDirection Direction
{
get{return m_Direction;}
set{m_Direction = value;}
}

public bool IsNullable
{
get{return m_blnIsNullable;}
set{m_blnIsNullable = value;}
}

public string ParameterName
{
get{return m_strParamName;}
set{m_strParamName = value;}
}

public string SourceColumn
{
get{return m_strSourceColumn;}
set{m_strSourceColumn = value;}
}

public DataRowVersion SourceVersion
{
get{return m_oDataRowVersion;}
set{m_oDataRowVersion = value;}
}
public object Value
{
get{return m_oValue;}
set{m_oValue = value;}
}
public int Size
{
get{return m_intSize;}
set{m_intSize = value;}
}

public byte Precision
{
get{return m_bytePrecision;}
set{m_bytePrecision = value;}
}
public byte Scale {
get{return m_byteScale;}
set{m_byteScale= value;}
}

#endregion

#region Public member
public object Clone()
{
return this;
}
#endregion

///
/// Default constructor. Initialize member variables to default value.
///

public SPParameter()
{
this.m_blnIsNullable = false;
this.m_oValue = null;
this.m_strParamName = null;
this.m_strSourceColumn = null;
}

}
}


Cheers,
Venkatraman Kalyanam
Chennai - India

"Being Excellent is not a skill, it is an attitude"
GeneralRe: Casting userdefined parameter class Pin
leppie13-Mar-03 6:19
leppie13-Mar-03 6:19 
GeneralSynchronized collections Pin
Don Miguel12-Mar-03 19:47
Don Miguel12-Mar-03 19:47 
GeneralRe: Synchronized collections Pin
Kannan Kalyanaraman12-Mar-03 21:24
Kannan Kalyanaraman12-Mar-03 21:24 
GeneralRe: Synchronized collections Pin
James T. Johnson13-Mar-03 11:33
James T. Johnson13-Mar-03 11:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.