<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fredrik Haglund's blog &#187; BDE</title>
	<atom:link href="http://blog.fredrikhaglund.se/blog/tag/bde/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fredrikhaglund.se</link>
	<description>Chatter about EPiServer, ASP.NET, CSS and Web Development.</description>
	<lastBuildDate>Thu, 15 Apr 2010 09:14:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>More about BDE</title>
		<link>http://blog.fredrikhaglund.se/blog/2007/05/12/more-about-bde/</link>
		<comments>http://blog.fredrikhaglund.se/blog/2007/05/12/more-about-bde/#comments</comments>
		<pubDate>Sat, 12 May 2007 17:41:06 +0000</pubDate>
		<dc:creator>Fredrik Haglund</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BDE]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[UAC]]></category>
		<category><![CDATA[User Account Control]]></category>
		<category><![CDATA[Vista, UAC]]></category>

		<guid isPermaLink="false">http://blog.fredrikhaglund.se/?p=24</guid>
		<description><![CDATA[I got some more questions yesterday after bloging about how to get you application using Paradox or dBase tables to function under Windows Vista yesterday.
The first one is how do you add BDE to you installation project? That is easy. Just download the BDE Merge Module and add the MSM-file to you Setup-project.
I read a [...]]]></description>
			<content:encoded><![CDATA[<p>I got some more questions yesterday after bloging about how to <a href="http://blog.fredrikhaglund.se/2007/05/09/small-questions/">get you application using Paradox or dBase tables to function under Windows Vista</a> yesterday.</p>
<p>The first one is how do you add BDE to you installation project? That is easy. Just download the <a href="http://www.codegear.com/downloads/regusers/delphi">BDE Merge Module</a> and add the MSM-file to you Setup-project.</p>
<p>I read a <a href="http://forums.installaware.com/viewtopic.php?p=4773&amp;sid=676c752c20a29c61269887cb9dc999c9">forum post how this can be extended with InstallAware pre-requisites mechanism</a> so the file-set is only downloaded and installed if needed.</p>
<p><img width="1" src="http://blogs.codegear.com/fhaglund/aggbug/34489.aspx" height="1" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fredrikhaglund.se/blog/2007/05/12/more-about-bde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small questions</title>
		<link>http://blog.fredrikhaglund.se/blog/2007/05/09/small-questions/</link>
		<comments>http://blog.fredrikhaglund.se/blog/2007/05/09/small-questions/#comments</comments>
		<pubDate>Wed, 09 May 2007 17:59:40 +0000</pubDate>
		<dc:creator>Fredrik Haglund</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BDE]]></category>
		<category><![CDATA[CodeGear]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[UAC]]></category>
		<category><![CDATA[User Account Control]]></category>
		<category><![CDATA[Vista, UAC]]></category>

		<guid isPermaLink="false">http://blog.fredrikhaglund.se/?p=23</guid>
		<description><![CDATA[I get a constant stream of small questions about Delphi in my inbox. Some are easy to answer and usually just send a quick response others are more complicated. But why not share some of those answers with all of you?
1) How can I install an external ActiveX control (.OCX file) in Delphi?

Click File &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I get a constant stream of small questions about Delphi in my inbox. Some are easy to answer and usually just send a quick response others are more complicated. But why not share some of those answers with all of you?</p>
<p><strong>1) How can I install an external ActiveX control (.OCX file) in Delphi?</strong></p>
<ul>
<li>Click <em>File</em> &gt; <em>New </em>&gt; <em>Package – Delphi for Win32</em></li>
<li>Save the Package project.</li>
<li>Click <em>Component</em> &gt; <em>Import Component…</em></li>
<li>Select <em>Import ActiveX control.</em></li>
<li>Select ActiveX-control in list or click Add and browse the for file.</li>
<li>Fill in component details, like name and palette page.
<ul>
<li>Optionally set unit directory to same location as where you saved the package project.</li>
<li>Optionally check <em>Generate component wrappers</em>.</li>
</ul>
</li>
<li>Select <em>Add unit to Package</em> and <em>Finish</em>.</li>
<li>Right click on<br />
the Package in Project manager to <em>Build</em> and <em>Install </em>package.´</li>
</ul>
<p>Why should I change where the unit is saved? Personally I prefer to have the package and its source in a folder under version control rather than have it stored in Delphi&#8217;s local import folder. It makes it easier for the rest of the team.</p>
<p><strong>Turbo Delphi 2006 Professional users</strong><br />
Import Component and View&gt;Type Library is missing because of a defect. Here is a workaround:</p>
<ul>
<li>Create this directory: $(BDS)\include\atl\</li>
<li>Create an empty file named: ATLBASE.H</li>
</ul>
<p>Turbo Delphi Pro now has the Component/Import Component and View/Type Library menu choices.</p>
<p><strong>2) How do I get my application with Paradox tables to work on Windows Vista?</strong></p>
<p>This one is a little bit tricky. There are several pitfalls here.</p>
<p>First of all you need to install BDE with your applications installer as usual. If you are using a comercial installer or call you installation executable setup.exe, Vista will detect that it is an installer and suggest running it as administrator which is needed to write files in the Program Files folder and the local machine registry.</p>
<p>Secondly, do you add global BDE-aliases for you database? They are stored in idapi.cfg file under Program Files where a standard user does not have the rights needed to alter files. It will work if you do this from the installer since it is running as administrator but if you add aliases from your application there might be trouble ahead! Windows Vista has a nasty compatibility feature called Virtualization or Redirection that will silently create personal copies of files instead of giving you an access denied error. Consider the administrative nightmare when every user has their own copy of idapi.cfg hidden in a personal VirtualStore folder. You can easily turn all compatibility features off by checking <em>Enable runtime themes</em> in <em>Project</em> &gt; <em>Options</em> &gt; <em>Application</em> in Delphi 2007 (or by manually adding a manifest). Remember that should always run the BDE Admin tool and control panel applet as administrator since running them as Standard User also will create a copy of idapi.cfg in the personal VirtualStore.</p>
<p>My suggestion is that you use a <em>TDatabase</em> component in you application instead of using global aliases and create a private alias for you application by setting DatabaseName and use <em>DriverName</em> and <em>Params</em> property instead of <em>Alias</em> property.</p>
<p>Next problem is the location of the database. If you have put you Paradox or dBase files it in the Program Files folder you will trigger Virtualization and then you have parts of the database in each users VirtualStore! Try to mend that mess into one database again. You should follow the steps above to add a manifest to your executable and get access denied errors instead of this mess.</p>
<p>Use the <em>SHGetFolderPath</em> function to get a path to a better location where Standard Users have read and write access. You will find an example of this in the <em>File &gt; New Other…&gt; Win2000 Logo Application.</em> Consider using CSIDL_COMMON_APPDATA if it is a shared database. You can easily get you installer to put you database files here instead by using pre-defined constants (i.e. [CommonAppDataFolder] in InstallShield, $ALLAPPDATA$ in InstallAware).</p>
<p>For Paradox there is the problem with <em>NetFileDir</em>. The default value &#8220;C:\&#8221; will not work. To get around this, add a <em>TSession</em> component to your application and set <em>NetFileDir</em> using a value from the <em>SHGetFolderPath</em> function. Use CSIDL_COMMON_APPDATA.</p>
<p>Finally, consider upgrading your Paradox or dBase database to InterBase instead! <img src='http://blog.fredrikhaglund.se/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fredrikhaglund.se/blog/2007/05/09/small-questions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
