S
sjoshi
Hello all
I'm passing a GUID as an Oracle Parameter using this :
sqlParm = new OracleParameter();
sqlParm.ParameterName = prm.ParamName;
sqlParm.OracleDbType = OracleDbType.RAW
sqlParm.Direction = prm.ParamDirection;
sqlParm.Size = 16;
sqlParm.Value = ((Guid)prm.ParamValue).ToByteArray();
cmd.Parameters.Add(sqlParm)
The Guid.ToString() is 32750000-0000-0000-0400-1f262144bf86
In SQLPlus I however see this as 000075320000000004001F262144BF86
When the code reaches the cmd.ExecuteReader() I get an exception saying
"OracleCommand.CommandText is invalid"
The sql sent at this stage is:
Select Distinct(prj.Name) as PrjName, prj.oid as PrjOid
Where prj.oid=ic.oidTarget And ic.oid=pd.oid And pd.oid= lant_oid
Is there something else I need to do when I pass a GUID as parameter. ?
thanks
Sunit
I'm passing a GUID as an Oracle Parameter using this :
sqlParm = new OracleParameter();
sqlParm.ParameterName = prm.ParamName;
sqlParm.OracleDbType = OracleDbType.RAW
sqlParm.Direction = prm.ParamDirection;
sqlParm.Size = 16;
sqlParm.Value = ((Guid)prm.ParamValue).ToByteArray();
cmd.Parameters.Add(sqlParm)
The Guid.ToString() is 32750000-0000-0000-0400-1f262144bf86
In SQLPlus I however see this as 000075320000000004001F262144BF86
When the code reaches the cmd.ExecuteReader() I get an exception saying
"OracleCommand.CommandText is invalid"
The sql sent at this stage is:
Select Distinct(prj.Name) as PrjName, prj.oid as PrjOid
ERLS.PRJMGTDatabase pdFrom ERLS.PRJMGTProjectRoot prj, ERLS.CORERELATIONDEST ic,
Where prj.oid=ic.oidTarget And ic.oid=pd.oid And pd.oid= lant_oid
Is there something else I need to do when I pass a GUID as parameter. ?
thanks
Sunit