-2009-10-27 Joerg Rosenkranz <joergr@voelcker.com>
+2009-10-29 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ ** Fixes #321718
+ * OciCalls.cs: Add stub for OCILobCharSetForm to get the charset
+ form associated with a CLOB/NCLOB.
+
+ * OciLobLocator.cs: Add Environment handle property that is
+ required to call OCILobCharSetForm and pass the output value to
+ OCILobRead.
+
+ * OciDefineHandler.cs: Update Environment property of
+ OCILobLocator.
+
+2009-10-27 Joerg Rosenkranz <joergr@voelcker.com>
* OciCalls.cs: Wrong function name in trace.
ushort csid,
byte csfrm);
+ [DllImport ("oci")]
+ internal static extern int OCILobCharSetForm (IntPtr svchp,
+ IntPtr errhp,
+ IntPtr locp,
+ out byte csfrm);
+
[DllImport ("oci")]
internal static extern int OCINlsGetInfo (IntPtr hndl,
IntPtr errhp,
piece, ctxp, cbfp, csid, csfrm);
}
+ internal static int OCILobCharSetForm (IntPtr svchp,
+ IntPtr errhp,
+ IntPtr locp,
+ out byte csfrm)
+ {
+ #if TRACE
+ Trace.WriteLineIf(traceOci, "OCILobCharSetForm", "OCI");
+ #endif
+ return OciNativeCalls.OCILobCharSetForm (svchp, errhp, locp, out csfrm);
+ }
+
internal static int OCINlsGetInfo (IntPtr hndl,
IntPtr errhp,
ref byte[] bufp,
value = lobLocator.Handle;
lobLocator.ErrorHandle = connection.ErrorHandle;
lobLocator.Service = connection.ServiceContext;
+ lobLocator.Environment = connection.Environment;
status = OciCalls.OCIDefineByPosPtr (Parent,
out handle,
bool disposed = false;
OciErrorHandle errorHandle;
OciServiceHandle service;
+ OciEnvironmentHandle environment;
OciDataType type;
#endregion // Fields
set { type = value; }
}
+ public OciEnvironmentHandle Environment {
+ get { return environment; }
+ set { environment = value; }
+ }
+
#endregion // Properties
#region Methods
{
int status = 0;
uint amount = count;
+ byte csfrm = 0;
// Character types are UTF-16, so amount of characters is 1/2
// the amount of bytes
- if (!binary)
+ if (!binary) {
amount /= 2;
-
+ status = OciCalls.OCILobCharSetForm (environment,
+ ErrorHandle,
+ this,
+ out csfrm);
+ if (status != 0) {
+ OciErrorInfo info = ErrorHandle.HandleError ();
+ throw new OracleException (info.ErrorCode, info.ErrorMessage);
+ }
+ }
+
status = OciCalls.OCILobRead (Service,
ErrorHandle,
this,
IntPtr.Zero,
IntPtr.Zero,
1000, // OCI_UCS2ID
- 0); // Ignored if csid is specified as above
+ csfrm);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
+2009-10-29 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ ** Fixes #321718
+ * OracleParameter.cs: Update Environment handle in OciLobLocator.
+
2009-09-30 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes #543207
bindValue = lobLocator.Handle;
lobLocator.ErrorHandle = connection.ErrorHandle;
lobLocator.Service = statement.Service;
+ lobLocator.Environment = connection.Environment;
useRef = true;
}
break;
bindValue = lobLocator.Handle;
lobLocator.ErrorHandle = connection.ErrorHandle;
lobLocator.Service = connection.ServiceContext;
+ lobLocator.Environment = connection.Environment;
useRef = true;
}
break;