<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bishopphillips.com/riskwiki/index.php?action=history&amp;feed=atom&amp;title=BpcDBEmbeddedWB</id>
	<title>BpcDBEmbeddedWB - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.bishopphillips.com/riskwiki/index.php?action=history&amp;feed=atom&amp;title=BpcDBEmbeddedWB"/>
	<link rel="alternate" type="text/html" href="https://www.bishopphillips.com/riskwiki/index.php?title=BpcDBEmbeddedWB&amp;action=history"/>
	<updated>2026-10-03T04:17:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://www.bishopphillips.com/riskwiki/index.php?title=BpcDBEmbeddedWB&amp;diff=137&amp;oldid=prev</id>
		<title>Bishopj: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.bishopphillips.com/riskwiki/index.php?title=BpcDBEmbeddedWB&amp;diff=137&amp;oldid=prev"/>
		<updated>2026-04-12T06:37:06Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:37, 12 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Bishopj</name></author>
	</entry>
	<entry>
		<id>https://www.bishopphillips.com/riskwiki/index.php?title=BpcDBEmbeddedWB&amp;diff=136&amp;oldid=prev</id>
		<title>Bishopj: Created page with &quot;==DB Aware Embedded Browser==  Language: Delphi 7 - 2007   This is a BPC modification to the TEmbeddedWB from Balsa [http://www.bsalsa.com/ http://www.bsalsa.com/].  The stand...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.bishopphillips.com/riskwiki/index.php?title=BpcDBEmbeddedWB&amp;diff=136&amp;oldid=prev"/>
		<updated>2019-09-11T23:01:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==DB Aware Embedded Browser==  Language: Delphi 7 - 2007   This is a BPC modification to the TEmbeddedWB from Balsa [http://www.bsalsa.com/ http://www.bsalsa.com/].  The stand...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==DB Aware Embedded Browser==&lt;br /&gt;
&lt;br /&gt;
Language: Delphi 7 - 2007&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a BPC modification to the TEmbeddedWB from Balsa [http://www.bsalsa.com/ http://www.bsalsa.com/].  The standard component implements an advanced wrapper for the IE browser API.  This version from BPC adds DB Aware functionality to the component including drag/drop and MHTML display, and enables reading and writing of the HTML content to display from a database blob field.  Think of it like a DB aware RichView memo, only for HTML content instead of RTF content.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This version is exclusive to BPC, and is available on request with source from BPC.  You will need the Balsa freeware components as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It registers two components - a URL Registry and the DBAware embedded browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Works with IE 6,7 and 8.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uses&lt;br /&gt;
  {$IFDEF DELPHI_6_UP}Variants, {$ENDIF}&lt;br /&gt;
  SysUtils, Classes, Windows, Types, Controls, OleCtrls, SHDocVw_EWB, EwbCore, EmbeddedWB, DBCtrls,&lt;br /&gt;
  DB, Messages, ComObj, ActiveX, UrlMon;&lt;br /&gt;
&lt;br /&gt;
const&lt;br /&gt;
  Class_bpcEWBDBNSHandler: TGUID = &amp;#039;{7D0847DC-7367-4EA0-AC30-2F39BFD9C862}&amp;#039;;&lt;br /&gt;
  EWNameSpace = &amp;#039;ewbdbfield&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
type&lt;br /&gt;
  TbpcEWBGetMimeExtProc= procedure ( sender : TObject; Var MimeExt : string; var bShowBlank : boolean ) of object;&lt;br /&gt;
  TbpcEWBGetDocName= procedure ( sender : TObject; Var DocName : string ) of object;&lt;br /&gt;
  TbpcEWBGetDocURL= procedure ( sender : TObject; Var URL : string ) of object;&lt;br /&gt;
&lt;br /&gt;
  EDBEWBEditError = class(Exception);&lt;br /&gt;
&lt;br /&gt;
  TbpcDBEmbeddedWB = class(TEmbeddedWB)&lt;br /&gt;
  private&lt;br /&gt;
    { Private declarations }&lt;br /&gt;
    FDataLink: TFieldDataLink;&lt;br /&gt;
    FReadOnly: boolean;&lt;br /&gt;
    FFocused: Boolean;&lt;br /&gt;
    FDefMimeExt : string;&lt;br /&gt;
    FOnGetMimeExt : TbpcEWBGetMimeExtProc;&lt;br /&gt;
    FOnGetDocName : TbpcEWBGetDocName;&lt;br /&gt;
    FOnGetDocURL  : TbpcEWBGetDocURL;&lt;br /&gt;
    FDBConnected : boolean;&lt;br /&gt;
&lt;br /&gt;
    procedure ActiveChange(Sender: TObject);&lt;br /&gt;
    procedure DataChange(Sender: TObject);&lt;br /&gt;
    procedure EditingChange(Sender: TObject);&lt;br /&gt;
    function GetDataField: string;&lt;br /&gt;
    function GetDataSource: TDataSource;&lt;br /&gt;
    function GetField: TField;&lt;br /&gt;
    function GetFieldText: string;&lt;br /&gt;
    procedure SetDataField(const Value: string);&lt;br /&gt;
    procedure SetDataSource(const Value: TDataSource);&lt;br /&gt;
    procedure CMGetDataLink(var Message: TMessage); message CM_GETDATALINK;&lt;br /&gt;
    function GetReadOnly: Boolean;&lt;br /&gt;
    procedure SetReadOnly(const Value: Boolean);&lt;br /&gt;
    function GetDBConnected: Boolean;&lt;br /&gt;
    procedure SetDBConnected(const Value: Boolean);&lt;br /&gt;
    procedure UpdateData(Sender: TObject);&lt;br /&gt;
&lt;br /&gt;
  protected&lt;br /&gt;
    { Protected declarations }&lt;br /&gt;
    function GetLabelText: string; //##JB Delete?&lt;br /&gt;
    procedure Notification(AComponent: TComponent;&lt;br /&gt;
      Operation: TOperation); override;&lt;br /&gt;
    procedure ValidateEdit;&lt;br /&gt;
    procedure ValidateError;&lt;br /&gt;
  public&lt;br /&gt;
    { Public declarations }&lt;br /&gt;
    LastURL : string;&lt;br /&gt;
    constructor Create(AOwner: TComponent); override;&lt;br /&gt;
    destructor Destroy; override;&lt;br /&gt;
    procedure SetFocused(Value: Boolean);&lt;br /&gt;
    procedure Loaded; override;&lt;br /&gt;
    function ExecuteAction(Action: TBasicAction): Boolean; override;&lt;br /&gt;
    function UpdateAction(Action: TBasicAction): Boolean; override;&lt;br /&gt;
    Procedure  DataRefresh;&lt;br /&gt;
    property Field: TField read GetField;&lt;br /&gt;
&lt;br /&gt;
// From EmbeddedWB&lt;br /&gt;
    property Modified;&lt;br /&gt;
{$IFDEF USE_EwbTools}&lt;br /&gt;
    property SelLength; // By M.Grusha&lt;br /&gt;
    property SelText; // By M.Grusha&lt;br /&gt;
    property SelTextHTML; // By M.Grusha&lt;br /&gt;
{$ENDIF}&lt;br /&gt;
// End From EmbeddedWB&lt;br /&gt;
&lt;br /&gt;
  published&lt;br /&gt;
    { Published declarations }&lt;br /&gt;
    property DataField: string read GetDataField write SetDataField;&lt;br /&gt;
    property DataSource: TDataSource read GetDataSource write SetDataSource;&lt;br /&gt;
    property ReadOnly: Boolean read GetReadOnly write SetReadOnly default True;&lt;br /&gt;
    property DBConnected: boolean read GetDBConnected write SetDBConnected default True;&lt;br /&gt;
&lt;br /&gt;
// From EmbeddedWB&lt;br /&gt;
    property About;&lt;br /&gt;
    property HostCSS;&lt;br /&gt;
    property HostNS;&lt;br /&gt;
    property EnableMessageHandler;&lt;br /&gt;
    property DisabledPopupMenuItems;&lt;br /&gt;
    property DisableErrors;&lt;br /&gt;
    property DialogBoxes;&lt;br /&gt;
    property OnCloseQuery;&lt;br /&gt;
    property OnShowDialog;&lt;br /&gt;
    property PrintOptions;&lt;br /&gt;
    property ProxySettings;&lt;br /&gt;
    property ShortCuts;&lt;br /&gt;
    property UserAgent;&lt;br /&gt;
    property VisualEffects;&lt;br /&gt;
// End From EmbeddedWB&lt;br /&gt;
    property DefMimeExt : string read FDefMimeExt write FDefMimeExt ;     // the default mime extension &amp;#039;.html&amp;#039;&lt;br /&gt;
    property OnGetMimeExt : TbpcEWBGetMimeExtProc read FOnGetMimeExt write FOnGetMimeExt; // Allow override of the default DefMimeExt&lt;br /&gt;
    property OnGetDocName : TbpcEWBGetDocName read FOnGetDocName write FOnGetDocName;     // Allow override of the default generated document name&lt;br /&gt;
    property OnGetDocURL : TbpcEWBGetDocURL read FOnGetDocURL write FOnGetDocURL;         // Allow override of db field retrieval with an URL&lt;br /&gt;
  end;&lt;br /&gt;
&lt;br /&gt;
  // Name space handler - required so that MHT files can be read and converted&lt;br /&gt;
  TbpcEWBDBNSHandler = class(TComObject, IInternetProtocol)&lt;br /&gt;
  private&lt;br /&gt;
    Url: string;&lt;br /&gt;
    Written, TotalSize: Integer;&lt;br /&gt;
    ProtSink: IInternetProtocolSink;&lt;br /&gt;
    DataStream: IStream;&lt;br /&gt;
    DataField : TField;&lt;br /&gt;
    RegisterURLIndex : Integer;&lt;br /&gt;
  protected&lt;br /&gt;
// IInternetProtocol Methods&lt;br /&gt;
    function Start(szUrl: PWideChar;&lt;br /&gt;
                   OIProtSink: IInternetProtocolSink;&lt;br /&gt;
                   OIBindInfo: IInternetBindInfo;&lt;br /&gt;
                   grfPI, dwReserved: DWORD): HResult; stdcall;&lt;br /&gt;
    function Continue(const ProtocolData:&lt;br /&gt;
                      TProtocolData): HResult; stdcall;&lt;br /&gt;
    function Abort(hrReason: HResult;&lt;br /&gt;
                   dwOptions: DWORD): HResult; stdcall;&lt;br /&gt;
    function Terminate(dwOptions: DWORD): HResult; stdcall;&lt;br /&gt;
    function Suspend: HResult; stdcall;&lt;br /&gt;
    function Resume: HResult; stdcall;&lt;br /&gt;
    function Read(pv: Pointer; cb: ULONG;&lt;br /&gt;
                  out cbRead: ULONG): HResult; stdcall;&lt;br /&gt;
    function Seek(dlibMove: LARGE_INTEGER;&lt;br /&gt;
                  dwOrigin: DWORD; out libNewPosition: ULARGE_INTEGER): HResult; stdcall;&lt;br /&gt;
    function LockRequest(dwOptions: DWORD): HResult; stdcall;&lt;br /&gt;
    function UnlockRequest: HResult; stdcall;&lt;br /&gt;
// Helper functions&lt;br /&gt;
    procedure GetDataFromDataField(Url: string);&lt;br /&gt;
  public&lt;br /&gt;
  end;&lt;br /&gt;
&lt;br /&gt;
  // The EWB - URL registry is needed to allow he namespace handler to find which field&lt;br /&gt;
  // is supplying the data for a given URL.  As the namespace handle is a run time factory&lt;br /&gt;
  // made object there is no direct way to pass the identity of the initiating  EWB to the factory&lt;br /&gt;
  // object..so the namespace handler does not know which field to use to get the data requested.&lt;br /&gt;
  // This resgistry object holds the global registry of URLs and Fields.  It will be most reliable when&lt;br /&gt;
  // the EWBDB is allowed to manufacture the URL without inerference by the user, other than by&lt;br /&gt;
  // setting the mime extension through the call back function.&lt;br /&gt;
  // This should be placed on the mainform.  Only one of these should exist in the application&lt;br /&gt;
  TbpcEWBDBURLRegistry = class(TComponent)&lt;br /&gt;
  public&lt;br /&gt;
    Registry : TStringlist;&lt;br /&gt;
    constructor Create(AOwner: TComponent); override;&lt;br /&gt;
    destructor Destroy; override;&lt;br /&gt;
    procedure RegisterURL( URL : string; Field : TField);&lt;br /&gt;
    procedure UnRegisterURL( URL : string ); overload;&lt;br /&gt;
    procedure UnRegisterURL( Index : integer ); overload;&lt;br /&gt;
    procedure ClearRegistry;&lt;br /&gt;
    function FindField( URL : string; var Index: Integer ) : TField;&lt;br /&gt;
  end;&lt;br /&gt;
&lt;br /&gt;
// Return a pointer to the global URL registry&lt;br /&gt;
function bpcEWBURLRegistry : TbpcEWBDBURLRegistry;&lt;br /&gt;
// Make a global URL registry and return a pointer to it&lt;br /&gt;
function bpcEWBURLRegistryInit : TbpcEWBDBURLRegistry;&lt;br /&gt;
// Dstroy the global URL Registry&lt;br /&gt;
procedure bpcEWBURLRegistryFree;&lt;br /&gt;
// Assign a URL Register to the global registry variable for future use&lt;br /&gt;
// WARNING: All Accesses from this point will be directed to the new registry&lt;br /&gt;
// WARNING: DOES NOT destroy the previous registry - this must be done manually&lt;br /&gt;
procedure bpcEWBURLRegistryAssign( value : TbpcEWBDBURLRegistry);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=BackLinks=&lt;br /&gt;
&lt;br /&gt;
{{#dpl: linksto={{FULLPAGENAME}} }}&lt;/div&gt;</summary>
		<author><name>Bishopj</name></author>
	</entry>
</feed>