public override void Describe() { lock (this.db) { // Update structure this.fields = new Descriptor(this.fields.ActualCount); // Marshal structures to pointer XsqldaMarshaler marshaler = XsqldaMarshaler.GetInstance(); IntPtr sqlda = marshaler.MarshalManagedToNative(this.db.Charset, fields); int[] statusVector = FesConnection.GetNewStatusVector(); int stmtHandle = this.handle; FbClient.isc_dsql_describe( statusVector, ref stmtHandle, IscCodes.SQLDA_VERSION1, sqlda); // Marshal Pointer Descriptor descriptor = marshaler.MarshalNativeToManaged(this.db.Charset, sqlda); // Free memory marshaler.CleanUpNativeData(ref sqlda); // Parse status vector this.db.ParseStatusVector(statusVector); // Update field descriptor this.fields = descriptor; } }