private void CreateOrOpen(int op, BlobParameterBuffer bpb)
		{
			lock (_database.SyncObject)
			{
				try
				{
					_database.Write(op);
					if (bpb != null)
					{
						_database.WriteTyped(IscCodes.isc_bpb_version1, bpb.ToArray());
					}
					_database.Write(_transaction.Handle);
					_database.Write(_blobId);
					_database.Flush();

					GenericResponse response = _database.ReadGenericResponse();

					_blobId = response.BlobId;
					_blobHandle = response.ObjectHandle;
				}
				catch (IOException)
				{
					throw new IscException(IscCodes.isc_net_read_err);
				}
			}
		}
Exemplo n.º 2
0
		private void CreateOrOpen(int op, BlobParameterBuffer bpb)
		{
			lock (this.db)
			{
				try
				{
					this.db.Send.Write(op);
					if (bpb != null)
					{
						this.db.Send.WriteTyped(IscCodes.isc_bpb_version1, bpb.ToArray());
					}
					this.db.Send.Write(this.transaction.Handle);
					this.db.Send.Write(this.blobId);
					this.db.Send.Flush();

					GdsResponse r = this.db.ReadGenericResponse();

					this.blobId = r.BlobId;
					this.blobHandle = r.ObjectHandle;
				}
				catch (IOException)
				{
					throw new IscException(IscCodes.isc_net_read_err);
				}
			}
		}