<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1207158706356918489</id><updated>2011-11-28T03:12:01.160+03:00</updated><title type='text'>How to Program: Swift and Easy</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>85</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1850254303077508260</id><published>2009-10-12T11:16:00.003+03:00</published><updated>2010-12-10T08:39:33.030+03:00</updated><title type='text'>Password Remover</title><content type='html'>How does it feel like to misplace something you often use?&lt;br /&gt;&lt;br /&gt;This happens a lot in real circumstances not only do we misplace tangible things such as keys etc but important data such as passwords. We handle documents everyday, whether in files, in folders or in flush disks. To ensure that no one else gets to read the information on our documents, we often protect our documents with difficult password that would take time for anyone to figure out.&lt;br /&gt;With time owing to the many passwords that we may be required to remember, it occurs that we fail to recall the exact &lt;span style="font-weight: bold;"&gt;passwords &lt;/span&gt;we used blocking ourselves from accessing the contents of the file.&lt;br /&gt;&lt;br /&gt;This can be a difficult situation especially when the data which has been blocked includes important data or information you need to refer or use at that time.&lt;br /&gt;With the use of special recovering software and data skills, it becomes a one click task and your documents become accessible again. Opening blocked files or password protected files such as excel files, word documents or even PDF files is now possible.&lt;br /&gt;&lt;br /&gt;Do not fail to get your work done on time or get incorrect information just because one of your files can not be opened due to a &lt;span style="font-weight: bold;"&gt;password protection&lt;/span&gt;. It can be easily opened if you hand it to those who can easily remove the protection without getting your documents corrupted.&lt;br /&gt;&lt;br /&gt;Get your files unblocked.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cell:&lt;/span&gt; +254-720-029-266&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;E-mail:&lt;/span&gt; eeric49@gmail.com&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.odesk.com/users/~~c761d4b8c0f1059c"&gt;&lt;img src="http://www.odesk.com/api/exams/v1/1967431/image" alt="oDesk Certified oDesk Contractor"/&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1850254303077508260?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1850254303077508260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/10/password-remover.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1850254303077508260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1850254303077508260'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/10/password-remover.html' title='Password Remover'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3358952703161800074</id><published>2009-09-08T15:05:00.025+03:00</published><updated>2009-09-09T15:51:32.602+03:00</updated><title type='text'></title><content type='html'>&lt;object width="800" height="350" type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" allowScriptAccess="never" allowNetworking="internal"&gt;&lt;param name="base" value="http://static.wix.com"/&gt;&lt;param name="movie" value="http://static.wix.com/client/app.swf" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="FlashVars" value="pageId=cbVq_zOKHWc-a&amp;embedFormat=normal&amp;embedID=4MBSz8Vs;pim5cg44Og01nx9HMWk4UPj1Ie5F5bMzixFQaXeZUVaJJJ0i5D4UEgFa&amp;partner_id=WMGs4POB1ko-a" /&gt;&lt;param name="scale" value="noScale" /&gt;&lt;param name="salign" value="tl" /&gt;&lt;embed src="http://static.wix.com/client/app.swf" quality="high" allowFullScreen="true" FlashVars="pageId=cbVq_zOKHWc-a&amp;embedFormat=normal&amp;embedID=4MBSz8Vs;pim5cg44Og01nx9HMWk4UPj1Ie5F5bMzixFQaXeZUVaJJJ0i5D4UEgFa&amp;partner_id=WMGs4POB1ko-a" type="application/x-shockwave-flash" width="800" height="350" base="http://static.wix.com" scale="noscale" salign="tl" &gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br /&gt;Where ?&lt;a href="http://www.ujanja.com?embedID=4MBSz8Vs;pim5cg44Og01nx9HMWk4UPj1Ie5F5bMzixFQaXeZUVaJJJ0i5D4UEgFa" &gt;&lt;b&gt;Check Out!&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;Lost &lt;a href="http://www.datarecovery.co.ke?embedID=4MBSz8Vs;pim5cg44Og01nx9HMWk4UPj1Ie5F5bMzixFQaXeZUVaJJJ0i5D4UEgFa"&gt;&lt;b&gt;Data!&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3358952703161800074?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3358952703161800074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/09/free-website-wix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3358952703161800074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3358952703161800074'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/09/free-website-wix.html' title=''/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5446934336933187235</id><published>2009-05-26T13:10:00.000+03:00</published><updated>2009-05-26T13:11:45.612+03:00</updated><title type='text'>Tentative definitions</title><content type='html'>The ANSI C standard supports the concept of the tentative definition. Any external data declaration that has no storage class specifier and no initializer is considered a tentative definition. If the identifier declared appears in a later definition, then the tentative definition is treated as if the &lt;span style="font-weight:bold;"&gt;extern&lt;/span&gt; storage class specifier were present. In other words, the tentative definition becomes a simple referencing declaration.&lt;br /&gt;&lt;br /&gt;If the end of the translation unit is reached and no definition has appeared with an initializer for the identifier, then the tentative definition becomes a full definition, and the object defined has uninitialized (zero-filled) space reserved for it. For example,&lt;br /&gt;&lt;br /&gt;int x;&lt;br /&gt;&lt;br /&gt;int x;           /*legal, one copy of x is reserved */&lt;br /&gt;int y;&lt;br /&gt;int y = 4;       /* legal, y is initialized to 4 */&lt;br /&gt;int z = 5;&lt;br /&gt;&lt;br /&gt;int z = 6;       /* not legal, both are initialized definitions */&lt;br /&gt;&lt;br /&gt;Unlike ANSI C, C++ doesn't have the concept of a tentative declaration; an external data declaration without a storage class specifier is always a definition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5446934336933187235?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5446934336933187235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tentative-definitions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5446934336933187235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5446934336933187235'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tentative-definitions.html' title='Tentative definitions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3135602849743490512</id><published>2009-05-26T13:09:00.000+03:00</published><updated>2009-05-26T13:10:00.131+03:00</updated><title type='text'>TClientDataSet</title><content type='html'>TClientDataSet implements a database-independent dataset.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Unit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;dbclient&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;TClientDataSet encapsulates a database-independent, distributed dataset. A client dataset can be used as a&lt;br /&gt;&lt;br /&gt;Fully-functional, standalone, flat-file dataset for single-tiered database applications. When used in this manner, an application uses the client dataset to read from and write to a user’s hard disk directly, without accessing a database engine.&lt;br /&gt; Client dataset in the client application portion of a multi-tiered database application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; The two functions described above are not mutually exclusive. A multi-tiered application can be designed to support the option of working with data off-line, using the “briefcase” model. On site, the application uses TClientDataSet to communicate with the application server’s data provider. When a user works off site, the client dataset writes a snapshot of the data to the hard disk.  The application works with this snapshot off site, with the client dataset acting as a flat-file dataset in a single-tiered application.&lt;br /&gt;&lt;br /&gt;The client dataset can communicate with a data provider directly by calling the provider component’&lt;br /&gt;s methods. When used in a client application as part of a multi-tiered application, the client dataset passes all calls to the provider through the remote data module’s IAppServer interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3135602849743490512?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3135602849743490512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdataset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3135602849743490512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3135602849743490512'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdataset.html' title='TClientDataSet'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4542196020634858423</id><published>2009-05-26T13:07:00.000+03:00</published><updated>2009-05-26T13:08:21.984+03:00</updated><title type='text'>IAppServer::AS_Execute</title><content type='html'>Executes the query or stored procedure bound to a specified provider.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;virtual&lt;/span&gt; HRESULT __safecall AS_Execute(&lt;span style="font-weight:bold;"&gt;const&lt;/span&gt; WideString: ProviderName, &lt;span style="font-weight:bold;"&gt;const&lt;/span&gt; WideString: CommandText, OleVariant &amp;Params, OleVariant &amp;OwnerData) = 0 ;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use AS_Execute to pass an execute command to a remote provider, using a specified set of parameters. AS_Execute calls the Execute method of the specified provider after assigning any parameters. Output parameters that result from executing a query or stored procedure are returned in the Params parameter.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; Different types of provider interpret the Execute command in different ways. Some providers merely generate BeforeExecute and AfterExecute events, while others execute a query or stored procedure.&lt;br /&gt;&lt;br /&gt;The ProviderName parameter specifies the name of the provider component associated with the query or stored procedure. &lt;br /&gt;&lt;br /&gt;CommandText specifies an optional SQL statement that replaces the SQL of the provider’s query, or the name of a stored procedure that replaces the provider’s stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.&lt;br /&gt;&lt;br /&gt;The Params parameter encodes any parameters expected by the query or stored procedure and returns any output parameters. To create a properly encoded value for Params from a TParams object, use the PackageParams routine. To decode Params into a TParams object, use the UnpackParams routine.&lt;br /&gt;&lt;br /&gt;The OwnerData parameter contains custom information that appears as an argument to the provider’s BeforeExecute and AfterExecute event handlers. This information originates in a client dataset’s BeforeExecute event handler. The value returned in OwnerData is passed to the client dataset’s AfterExecute event handler.&lt;br /&gt;&lt;br /&gt;Client applications must explicitly call AS_Execute through the client dataset’s Execute method. C++Builder does not call AS_Execute automatically.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4542196020634858423?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4542196020634858423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/iappserverasexecute.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4542196020634858423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4542196020634858423'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/iappserverasexecute.html' title='IAppServer::AS_Execute'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7955331447301510478</id><published>2009-05-26T13:06:00.001+03:00</published><updated>2009-05-26T13:06:53.363+03:00</updated><title type='text'>Field Link designer</title><content type='html'>The Field Link Designer provides a visual way to link (join) master and detail tables. &lt;br /&gt;At design time, drop a TDataSource object on the form and define a datasource. Select the TTable component and double-click the &lt;span style="font-weight:bold;"&gt;MasterFields&lt;/span&gt; property in the Object Inspector to invoke the Field Link designer. &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Available Indexes combo box&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Available Indexes combo box shows the currently selected index used to join the tables. Unless you specify a different index name in the table’s &lt;span style="font-weight:bold;"&gt;IndexName&lt;/span&gt; property, the default index used for the link is the primary index for the table. Other available indexes defined on the table can be selected from the drop-down list. &lt;br /&gt;&lt;br /&gt;To link master and detail tables:&lt;br /&gt;&lt;br /&gt;1 Select the field to use to link the detail table in the Detail Fields list&lt;br /&gt;2 Select the field to link the master table in the Master Fields list. &lt;br /&gt;3 Choose Add. &lt;br /&gt;&lt;br /&gt;The selected fields are be displayed in the Joined Fields list box. For example,&lt;br /&gt;&lt;br /&gt;OrderNo -&gt; OrderNo&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Note:&lt;/span&gt; For tables on a database server, the Available Indexes combo box will not appear, and you must manually select the detail and master fields to join in the Detail Fields and Master Fields list boxes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7955331447301510478?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7955331447301510478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/field-link-designer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7955331447301510478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7955331447301510478'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/field-link-designer.html' title='Field Link designer'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3908827292502309402</id><published>2009-05-26T13:02:00.000+03:00</published><updated>2009-05-26T13:03:25.582+03:00</updated><title type='text'>BeforeGetRecords, Active, CloneCursor, FetchOnDemand Example</title><content type='html'>This example shows how to use the BeforeGetRecords event handler to send the application server information it needs for incremental data fetching. Before fetching the next data packet, the client dataset packages up the key value of the last record so that the application server knows where to begin the next data packet. It also sends some application-specific information, which is stored in Memo1.&lt;br /&gt;&lt;br /&gt;void __fastcall TForm1::ClientDataSet1BeforeGetRecords(TObject *Sender, OleVariant &amp;OwnerData)&lt;br /&gt;{&lt;br /&gt;  OleVariant[2] Values;&lt;br /&gt;  Values[0] = NULL;&lt;br /&gt;  if (ClientDataSet1-&gt;Active)&lt;br /&gt;  {&lt;br /&gt;    ClientDataSet *CDSClone = new ClientDataSet(Form1);&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      CDSClone-&gt;CloneCursor(ClientDataSet1, true);&lt;br /&gt;      // turn off FetchOnDemand so that the clone only&lt;br /&gt;      // fetches the last LOCAL record&lt;br /&gt;      CDSClone-&gt;FetchOnDemand = false;&lt;br /&gt;      CDSClone-&gt;Last();&lt;br /&gt;      Values[0] = CDSClone-&gt;Fields-&gt;Fields[0]-&gt;Value;&lt;br /&gt;      CDSClone-&gt;Close();&lt;br /&gt;    }&lt;br /&gt;    __finally&lt;br /&gt;    {&lt;br /&gt;      delete CDSClone;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  Values[1] = Memo1-&gt;Lines-&gt;Text;&lt;br /&gt;  OwnerData = VarArrayOf(Values,1);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3908827292502309402?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3908827292502309402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/beforegetrecords-active-clonecursor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3908827292502309402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3908827292502309402'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/beforegetrecords-active-clonecursor.html' title='BeforeGetRecords, Active, CloneCursor, FetchOnDemand Example'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4039102263638322065</id><published>2009-05-26T13:00:00.001+03:00</published><updated>2009-05-26T13:05:42.763+03:00</updated><title type='text'>TClientDataSet::FetchOnDemand</title><content type='html'>Indicates whether to fetch data packets from the provider on an as needed basis.&lt;br /&gt;&lt;br /&gt;__property bool FetchOnDemand = {read=FFetchOnDemand, write&lt;br /&gt;=FFetchOnDemand, default=1};&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;By default FetchOnDemand is &lt;span style="font-weight:bold;"&gt;true,&lt;/span&gt; meaning that the client dataset fetches additional packets of data as needed (for example, as a user scrolls through data, or conducts a search). If the server does not automatically include BLOB fields or nested detail sets in data packets, setting FetchOnDemand to &lt;span style="font-weight:bold;"&gt;true &lt;/span&gt;causes the client dataset to fetch these values when needed as well.&lt;br /&gt;&lt;br /&gt;Set FetchOnDemand to &lt;span style="font-weight:bold;"&gt;false&lt;/span&gt; only if your client application contains code that explicitly fetches data packets as needed using the GetNextPacket method. Similarly, if FetchOnDemand is &lt;span style="font-weight:bold;"&gt;false&lt;/span&gt;, and the provider component does not include BLOB data by default (Options includes poFetchBlobsOnDemand), the client application must fetch BLOB fields explicitly using the FetchBlobs method. If the provider does not include nested detail sets (Options includes poFetchDetailsOnDemand) and FetchOnDemand is false, the client application must fetch nested details explicitly using the FetchDetails method.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://swifteasyprogramming.blogspot.com/2009/05/beforegetrecords-active-clonecursor.html"&gt;FetchOnDemand Example&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4039102263638322065?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4039102263638322065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetfetchondemand.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4039102263638322065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4039102263638322065'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetfetchondemand.html' title='TClientDataSet::FetchOnDemand'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4797068743486011067</id><published>2009-05-26T12:45:00.000+03:00</published><updated>2009-05-26T13:00:26.080+03:00</updated><title type='text'>TClientDataSet::GetNextPacket</title><content type='html'>Retrieves the next block of records from the application server.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;int __fastcall&lt;/span&gt; GetNextPacket(&lt;span style="font-weight:bold;"&gt;void&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Call GetNextPacket to retrieve the next sequential block of records from the application server. To specify the maximum number of records to return in a packet, set the PacketRecords property before calling GetNextPacket. A packet is appended to those records already stored in the Data property.&lt;br /&gt;&lt;br /&gt;GetNextPacket returns the number of records added to Data. If the return value is 0, the client application has already received all available records from the application server.&lt;br /&gt;&lt;br /&gt;Warning: If the client dataset uses a stateless application server, you must use a BeforeGetRecords event handler to ensure that the data packet returns the correct set of records.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4797068743486011067?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4797068743486011067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetgetnextpacket_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4797068743486011067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4797068743486011067'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetgetnextpacket_26.html' title='TClientDataSet::GetNextPacket'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8420521557964968213</id><published>2009-05-26T12:43:00.000+03:00</published><updated>2009-05-26T12:44:59.265+03:00</updated><title type='text'>TClientDataSet::FetchDetails</title><content type='html'>Retrieves nested detail datasets from the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;void __fastcall&lt;/span&gt; FetchDetails(&lt;span style="font-weight:bold;"&gt;void&lt;/span&gt;);&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Call FetchDetails to retrieve nested detail sets from an application server when this information is not provided automatically. Nested details are automatically included in data packets unless the provider on the application server includes poFetchDetailsOnDemand in its Options property. FetchDetails updates the current record to include the missing detail data sets.&lt;br /&gt;&lt;br /&gt;There is no need to call FetchDetails if the provider automatically includes nested detail sets or if the client dataset’s FetchOnDemand property is true.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8420521557964968213?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8420521557964968213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetfetchdetails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8420521557964968213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8420521557964968213'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetfetchdetails.html' title='TClientDataSet::FetchDetails'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6903639376728598003</id><published>2009-05-26T12:41:00.000+03:00</published><updated>2009-05-26T12:43:11.090+03:00</updated><title type='text'>TBaseProvider::Options</title><content type='html'>Influences what is included in data packets and how the information in data packets is used.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;__property&lt;/span&gt; TProviderOptions Options = {&lt;span style="font-weight:bold;"&gt;read&lt;/span&gt;=FProviderOptions, &lt;span style="font-weight:bold;"&gt;write&lt;/span&gt;&lt;br /&gt;=FProviderOptions, &lt;span style="font-weight:bold;"&gt;default&lt;/span&gt;=0};&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Set Options to customize how the provider communicates with client datasets. Options is a set that specifies&lt;br /&gt;&lt;br /&gt;Whether nested detail sets and BLOB data are included in data packets or fetched separately.&lt;br /&gt; Whether data packets include field component properties such as formats, display names, and maximum &amp; minimum values.&lt;br /&gt; Whether data packets are provided on a read-only basis, and whether specific types of changes (insertions, edits, or deletions) are disabled.&lt;br /&gt; Whether changes to master table fields should cause corresponding updates to detail tables.&lt;br /&gt;&lt;br /&gt;Whether a single client update can affect multiple server records.&lt;br /&gt; Whether the clients records are refreshed when it applies updates.&lt;br /&gt; Whether the client can send SQL statements that override the provider’s dataset.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; Not all options are supported by an InternetExpress client. Specifically, InternetExpress clients don’t support poFetchBlobsOnDemand, poFetchDetailsOnDemand, poDisableInserts, poDisableEdits, psDisableDeletes, poPropogateChanges, and poAllowCommandText.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6903639376728598003?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6903639376728598003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tbaseprovideroptions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6903639376728598003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6903639376728598003'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tbaseprovideroptions.html' title='TBaseProvider::Options'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2595255309907927788</id><published>2009-05-26T12:26:00.000+03:00</published><updated>2009-05-26T12:40:54.013+03:00</updated><title type='text'>TClientDataSet::FetchBlobs</title><content type='html'>Retrieves BLOB field values from the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;void __fastcall&lt;/span&gt; FetchBlobs(&lt;span style="font-weight:bold;"&gt;void&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Call FetchBlobs to retrieve BLOB field values from an application server when this information is not provided automatically. BLOB field values are automatically included in data packets unless the provider on the application server includes poFetchBlobsOnDemand in its Options property.&lt;br /&gt;&lt;br /&gt;There is no need to call FetchBlobs if the provider automatically includes BLOB data or if the client dataset’s FetchOnDemand property is true.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2595255309907927788?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2595255309907927788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetfetchblobs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2595255309907927788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2595255309907927788'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetfetchblobs.html' title='TClientDataSet::FetchBlobs'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3605158569793145145</id><published>2009-05-26T12:22:00.000+03:00</published><updated>2009-05-26T12:26:07.800+03:00</updated><title type='text'>cdecl, _cdecl, __cdecl</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Syntax&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;cdecl&lt;/span&gt; &lt;data/function definition&gt; ;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;_cdecl&lt;/span&gt; &lt;data/function definition&gt; ;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;__cdecl&lt;/span&gt; &lt;data/function definition&gt; ;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use a &lt;span style="font-weight:bold;"&gt;cdecl,&lt;/span&gt; _&lt;span style="font-weight:bold;"&gt;cdecl&lt;/span&gt;, or _&lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt; modifier to declare a variable or a function using the C-style naming conventions (case-sensitive, with a leading underscore appended). When you use&lt;span style="font-weight:bold;"&gt; cdecl, _cdecl,&lt;/span&gt; or __cdecl in front of a function, it affects how the parameters are passed (parameters are pushed right to left, and the caller cleans up the stack). The &lt;span style="font-weight:bold;"&gt;__cdecl &lt;/span&gt;modifier overrides the compiler directives and IDE options.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight:bold;"&gt;cdecl, _cdecl,&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;__cdecl &lt;/span&gt;keywords are specific to C++Builder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3605158569793145145?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3605158569793145145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/cdecl-cdecl-cdecl_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3605158569793145145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3605158569793145145'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/cdecl-cdecl-cdecl_26.html' title='cdecl, _cdecl, __cdecl'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4311324284339805253</id><published>2009-05-26T12:19:00.000+03:00</published><updated>2009-05-26T12:22:45.942+03:00</updated><title type='text'>Linkage</title><content type='html'>An executable program is usually created by compiling several independent translation units, then linking the resulting object files with preexisting libraries. A problem arises when the same identifier is declared in different scopes (for example, in different files), or declared more than once in the same scope. Linkage is the process that allows each instance of an identifier to be associated correctly with one particular object or function. All identifiers have one of three linkage attributes, closely related to their scope: external linkage, internal linkage, or no linkage. These attributes are determined by the placement and format of your declarations, together with the explicit (or implicit by default) use of the storage class specifier static or extern.&lt;br /&gt;&lt;br /&gt;Each instance of a particular identifier with external linkage represents the same object or function throughout the entire set of files and libraries making up the program. Each instance of a particular identifier with internal linkage represents the same object or function within one file only. Identifiers with no linkage represent unique entities.&lt;br /&gt;&lt;br /&gt;External and internal linkage rules&lt;br /&gt;&lt;br /&gt;  Any object or file identifier having file scope will have internal linkage if its declaration contains the storage class specifier static.&lt;br /&gt; For C++, if the same identifier appears with both internal and external linkage within the same file, the identifier will have external linkage. In C, it will have internal linkage.&lt;br /&gt;  If the declaration of an object or function identifier contains the storage class specifier extern&lt;br /&gt;, the identifier has the same linkage as any visible declaration of the identifier with file scope. If there is no such visible declaration, the identifier has external linkage.&lt;br /&gt;&lt;br /&gt;  If a function is declared without a storage class specifier, its linkage is determined as if the storage class specifier extern had been used.&lt;br /&gt;  If an object identifier with file scope is declared without a storage class specifier, the identifier has external linkage.&lt;br /&gt;&lt;br /&gt;Identifiers with no linkage attribute:&lt;br /&gt;&lt;br /&gt;  Any identifier declared to be other than an object or a function (for example, a typedef identifier)&lt;br /&gt;  Function parameters&lt;br /&gt;  Block scope identifiers for objects declared without the storage class specifier extern&lt;br /&gt;&lt;br /&gt;Name mangling&lt;br /&gt;&lt;br /&gt;When a C++ module is compiled, the compiler generates function names that include an encoding of the function's argument types. This is known as name mangling. It makes overloaded functions possible, and helps the linker catch errors in calls to functions in other modules. However, there are times when you won't want name mangling. When compiling a C++ module to be linked with a module that does not have mangled names, the C++ compiler has to be told not to mangle the names of the functions from the other module. This situation typically arises when linking with libraries or .OBJ files compiled with a C compiler&lt;br /&gt;&lt;br /&gt;To tell the C++ compiler not to mangle the name of a function, declare the function as extern "C", like this:&lt;br /&gt;&lt;br /&gt;extern "C" void Cfunc( int );&lt;br /&gt;&lt;br /&gt;This declaration tells the compiler that references to the function Cfunc should not be mangled.&lt;br /&gt;&lt;br /&gt;You can also apply the extern "C" declaration to a block of names:&lt;br /&gt;&lt;br /&gt;extern "C" {&lt;br /&gt;&lt;br /&gt;   void Cfunc1( int );&lt;br /&gt;   void Cfunc2( int );&lt;br /&gt;   void Cfunc3( int );&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;As with the declaration for a single function, this declaration tells the compiler that references to the functions Cfunc1, Cfunc2, and Cfunc3 should not be mangled. You can also use this form of block declaration when the block of function names is contained in a header file:&lt;br /&gt;&lt;br /&gt;extern "C" {&lt;br /&gt;&lt;br /&gt;   #include "locallib.h"&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note&lt;/span&gt;: extern “C” cannot be used with class identifiers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4311324284339805253?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4311324284339805253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/linkage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4311324284339805253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4311324284339805253'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/linkage.html' title='Linkage'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-584750058723800069</id><published>2009-05-26T12:14:00.000+03:00</published><updated>2009-05-26T12:15:48.872+03:00</updated><title type='text'>OleVariant</title><content type='html'>OleVariant is a C++Builder implementation of the Object Pascal intrinsic type OleVariant.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Header&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;sysvari.h&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OleVariant is a special descendant of the Variant class that is used to represent COM interfaces or data that is passed over a COM interface. OleVariant inherits from Variant as a protected class so that it can prevent operations on AnsiString objects, which are not compatible with COM.&lt;br /&gt;&lt;br /&gt;The syntax for using OleVariant is the same as that for using the Variant class. Like the Variant class, OleVariant has the following characteristics:&lt;br /&gt;&lt;br /&gt;OleVariants can contain integer values, real values, string values, boolean values, date-and-time values, and Automation objects. In addition, OleVariants can contain arrays of varying size and dimension with elements of any of these types.&lt;br /&gt; The special OleVariant value Unassigned is used to indicate that a OleVariant has not yet been assigned a value, and the special OleVariant value Null is used to indicate unknown or missing data.&lt;br /&gt; A OleVariant can be combined with other OleVariants and it can be constructed from any of the following data types. The compiler automatically performs the necessary type conversions.&lt;br /&gt;&lt;br /&gt;• short WordBool&lt;br /&gt;• int Byte&lt;br /&gt;• float Variant&lt;br /&gt;• double WideString&lt;br /&gt;• Currency wchar_t*&lt;br /&gt;• TDateTime Ole2::IDispatch*&lt;br /&gt;• bool Ole2::IUnknown*&lt;br /&gt;&lt;br /&gt;•&lt;br /&gt;&lt;br /&gt;When an OleVariant contains an Automation object, the OleVariant can be used to get and set properties of the object, and to invoke methods on the object.&lt;br /&gt;&lt;br /&gt;OleVariant variables are always initialized to be Unassigned when they are first created. This is true whether a OleVariant variable is global, local, or part of a structure such as an array.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note&lt;/span&gt; that while OleVariants offer great flexibility, they also consume more memory than regular variables, and operations on OleVariants are substantially slower than operations on statically typed values.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; Use only the operators declared within OleVariant. The compiler will ignore any operators you overload yourself.&lt;br /&gt;Note: For binary operators, if one operand is of type OleVariant, the other operand is automatically converted to type OleVariant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-584750058723800069?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/584750058723800069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/olevariant.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/584750058723800069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/584750058723800069'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/olevariant.html' title='OleVariant'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2425189758093038623</id><published>2009-05-26T12:08:00.000+03:00</published><updated>2009-05-26T12:14:07.101+03:00</updated><title type='text'>TClientDataSet::AppendData</title><content type='html'>Adds a newly fetched packet of records to those already stored in the client dataset.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;void __fastcall&lt;/span&gt; AppendData(&lt;span style="font-weight:bold;"&gt;const &lt;/span&gt;System::OleVariant &amp;Data, &lt;span style="font-weight:bold;"&gt;bool&lt;/span&gt; HitEOF);&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use AppendData to add a newly fetched packet of records from the server application to the client dataset. Data indicates the packet of records to add. HitEOF indicates whether or not the application server encountered the end of the dataset when it fetched the records from the database server.&lt;br /&gt;&lt;br /&gt;Most applications call GetNextPacket instead to fetch a packet of records and automatically add them to those already available. Use AppendData when fetching data packets directly from the application server rather than letting the client dataset fetch data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2425189758093038623?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2425189758093038623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetappenddata.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2425189758093038623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2425189758093038623'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetappenddata.html' title='TClientDataSet::AppendData'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3409301927788308903</id><published>2009-05-13T08:52:00.002+03:00</published><updated>2009-05-13T08:56:34.534+03:00</updated><title type='text'>MIDAS technology</title><content type='html'>1&lt;span style="font-weight:bold;"&gt;.Understanding MIDAS technology&lt;/span&gt;&lt;br /&gt;MIDAS requires MIDAS.DLL, which is used by both client and server applications to manage datasets stored as data packets. Building MIDAS applications may also require the SQL explorer to help in database administration and to import server constraints into the Data Dictionary so that they can be checked at any level of the multi-tiered application.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NB&lt;/span&gt;:You must purchase server licenses for deploying your MIDAS applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Component and there Description&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;remote data modules&lt;/span&gt;-Specialized data modules that work with a COM Automation server to give client applications access to any providers they contain. Used on the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;provider component&lt;/span&gt; -A data broker that provides data by creating data packets and resolves client updates. Used on the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;client dataset component&lt;/span&gt;-A specialized dataset that uses MIDAS.DLL to manage data stored in data packets.&lt;br /&gt;connection components-A family of components that locate the server, form connections, and make the IAppServer interface available to client datasets. Each connection component is specialized to use a particular communications protocol.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2.Building a multi-tiered application&lt;/span&gt;&lt;br /&gt;The general steps for creating a multi-tiered database application are&lt;br /&gt;&lt;br /&gt;i)Create the application server.&lt;br /&gt;&lt;br /&gt;ii)Register or install the application server. &lt;br /&gt;If the application server uses DCOM, HTTP, or sockets as a communication protocol, it acts as an Automation server and must be registered like any other r COM server. For information about registering an application, see Registering a COM object. &lt;br /&gt;If you are using a transactional data module, you do not register the application server. Instead, you install it with MTS or COM+. For information about installing transactional objects, see Installing transactional objects. &lt;br /&gt;&lt;br /&gt;iii)Create a client application.&lt;br /&gt;The order of creation is important. You should create and run the application server before you create a client. At design time, you can then connect to the application server to test your client. You can, of course, create a client without specifying the application server at design time, and only supply the server name at runtime. However, doing so prevents you from seeing if your application works as expected when you code at design time, and you will not be able to choose servers and providers using the Object Inspector.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NB&lt;/span&gt; If you are not creating the client application on the same system as the server, and you are not using a Web connection or socket connection, you may want to register or install the application server on the client system. This makes the connection component aware of the application server at design time so that you can choose server names and provider names from a drop-down list in the Object Inspector. (If you are using a Web connection or socket connection, the connection component fetches the names of registered servers from the server machine.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3409301927788308903?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3409301927788308903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/midas-technology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3409301927788308903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3409301927788308903'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/midas-technology.html' title='MIDAS technology'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2025523014504347924</id><published>2009-05-13T08:34:00.000+03:00</published><updated>2009-05-13T08:36:36.565+03:00</updated><title type='text'>Advantages of the multi-tiered database model</title><content type='html'>The multi-tiered database model breaks a database application into logical pieces. The client application can focus on data display and user interactions. Ideally, it knows nothing about how the data is stored or maintained. The application server (middle tier) coordinates and processes requests and updates from multiple clients. It handles all the details of defining datasets and interacting with the remote database server.&lt;br /&gt;The advantages of this multi-tiered model include the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Encapsulation of business logic in a shared middle tier.&lt;/span&gt; Different client applications all access the same middle tier. This allows you to avoid the redundancy (and maintenance cost) of duplicating your business rules for each separate client application. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Thin client applications.&lt;/span&gt; Your client applications can be written to make a small footprint by delegating more of the processing to middle tiers. Not only are client applications smaller, but they are easier to deploy because they don’t need to worry about installing, configuring, and maintaining the database connectivity software (such as the Borland Database Engine). Thin client applications can be distributed over the Internet for additional flexibility.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Distributed data processing.&lt;/span&gt; Distributing the work of an application over several machines can improve performance because of load balancing, and allow redundant systems to take over when a server goes down.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Increased opportunity for security&lt;/span&gt;. You can isolate sensitive functionality into tiers that have different access restrictions. This provides flexible and configurable levels of security. Middle tiers can limit the entry points to sensitive material, allowing you to control access more easily. If you are using HTTP or MTS, you can take advantage of the security models they support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2025523014504347924?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2025523014504347924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/advantages-of-multi-tiered-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2025523014504347924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2025523014504347924'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/advantages-of-multi-tiered-database.html' title='Advantages of the multi-tiered database model'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5504494470151938429</id><published>2009-05-13T08:32:00.002+03:00</published><updated>2009-05-13T09:04:15.053+03:00</updated><title type='text'>MIDAS Program</title><content type='html'>Distributing database applications&lt;br /&gt;C++Builder provides support for creating distributed database applications using the MIDAS technology. This powerful technology includes a coordinated set of components that allow you to build a wide variety of multi-tiered database applications. Distributed database applications can be built on a variety of communications protocols, including DCOM, TCP/IP, and OLEnterprise&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Creating multi-tiered applications&lt;/span&gt;.&lt;br /&gt;A multi-tiered client/server application is partitioned into logical units which run in conjunction on separate machines. Multi-tiered applications share data and communicate with one another over a local-area network or even over the Internet. They provide many &lt;a href="http://swifteasyprogramming.blogspot.com/2009/05/advantages-of-multi-tiered-database.html"&gt;benefits&lt;/a&gt;, such as centralized business logic and thin client applications.&lt;br /&gt;&lt;br /&gt;In its simplest form, sometimes called the “three-tiered model,” a multi-tiered application is partitioned into thirds:&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;-Client application:&lt;/span&gt; provides a user interface on the user’s machine.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;-Application server:&lt;/span&gt; resides in a central networking location accessible to all clients and provides common data services.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;-Remote database server:&lt;/span&gt; provides the relational database management system (RDBMS).&lt;br /&gt;&lt;br /&gt;In this three-tiered model, the application server manages the flow of data between clients and the remote database server, so it is sometimes called a “data broker.” With C++Builder you usually only create the application server and its clients, although, if you are really ambitious, you could create your own database back end as well.&lt;br /&gt;In more complex multi-tiered applications, additional services reside between a client and a remote database server. For example, there might be a security services broker to handle secure Internet transactions, or bridge services to handle sharing of data with databases on platforms not directly supported by C++Builder.&lt;br /&gt;C++Builder support for multi-tiered applications is based on the Multi-tier Distributed Application Services Suite (MIDAS)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5504494470151938429?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5504494470151938429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/midas-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5504494470151938429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5504494470151938429'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/midas-program.html' title='MIDAS Program'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-31773773485827031</id><published>2009-05-13T08:29:00.001+03:00</published><updated>2009-05-13T08:31:49.515+03:00</updated><title type='text'>__msreturn</title><content type='html'>&lt;span style="font-weight:bold;"&gt;__msreturn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Syntax&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;__msreturn&lt;/span&gt; &lt;function-name&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;This calling convention is used for Microsoft compatible __fastcall calling convention return values. Structures with a size that is greater than 4 bytes and less than 9 bytes, and having at least one of its members sized 4 bytes or larger, are returned in EAX/EDX.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Calling convention mangling compatibility option&lt;/span&gt;&lt;br /&gt;(Command-line switch: &lt;span style="font-weight:bold;"&gt;-VC&lt;/span&gt;)&lt;br /&gt;When this option is set, the compiler disables the distinction of function names where the only possible difference is incompatible code generation options. For example, with this option set, the linker will not detect if a call is made to a _ &lt;span style="font-weight:bold;"&gt;_fastcall&lt;/span&gt; member function with th&lt;span style="font-weight:bold;"&gt;e cdecl&lt;/span&gt; calling convention.&lt;br /&gt;This option is provided for backward compatibility only; it lets you link old library files that you cannot recompile.&lt;br /&gt;&lt;br /&gt;Default = OFF&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-31773773485827031?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/31773773485827031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/msreturn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/31773773485827031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/31773773485827031'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/msreturn.html' title='__msreturn'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3475808462430696436</id><published>2009-05-13T08:27:00.000+03:00</published><updated>2009-05-13T08:29:11.285+03:00</updated><title type='text'>__msfastcall</title><content type='html'>&lt;span style="font-weight:bold;"&gt;__msfastcall&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Syntax&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;__msfastcall&lt;/span&gt; &lt;function-name&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;This calling convention emulates the Microsoft implementation of the fastcall calling convertion. The first two DWORD or smaller arguments are passed in ECX and EDX registers, all other arguments are passed from right to left. The called function is responsible for removing these arguments from the stack.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3475808462430696436?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3475808462430696436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/msfastcall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3475808462430696436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3475808462430696436'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/msfastcall.html' title='__msfastcall'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5382107653671511487</id><published>2009-05-13T08:24:00.001+03:00</published><updated>2009-05-13T08:27:35.064+03:00</updated><title type='text'>_export, __export</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Form 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;class _export&lt;/span&gt; &lt;class name&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Form 2&lt;/span&gt;&lt;br /&gt;return_type &lt;span style="font-weight:bold;"&gt;_export&lt;/span&gt; &lt;function name&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Form 3&lt;/span&gt;&lt;br /&gt;data_type _&lt;span style="font-weight:bold;"&gt;export &lt;/span&gt;&lt;data name&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;These modifiers are used to export classes, functions, and data.&lt;br /&gt;The linker enters functions flagged with &lt;span style="font-weight:bold;"&gt;_export&lt;/span&gt; or &lt;span style="font-weight:bold;"&gt;__expor&lt;/span&gt;t into an export table for the module.&lt;br /&gt;Using _export or &lt;span style="font-weight:bold;"&gt;__export&lt;/span&gt; eliminates the need for an EXPORTS section in your module definition file.&lt;br /&gt;Functions that are not modified with &lt;span style="font-weight:bold;"&gt;_export&lt;/span&gt; or &lt;span style="font-weight:bold;"&gt;__export&lt;/span&gt; receive abbreviated prolog and epilog code, resulting in a smaller object file and slightly faster execution.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;NB:&lt;/span&gt;If you use &lt;span style="font-weight:bold;"&gt;_export&lt;/span&gt; or &lt;span style="font-weight:bold;"&gt;__export&lt;/span&gt; to export a function, that function will be exported by name rather than by ordinal (ordinal is usually more efficient).&lt;br /&gt;If you want to change various attributes from the default, you'll need a module definition file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5382107653671511487?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5382107653671511487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/export-export.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5382107653671511487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5382107653671511487'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/export-export.html' title='_export, __export'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6515477212033434503</id><published>2009-05-13T08:22:00.001+03:00</published><updated>2009-05-13T08:24:02.920+03:00</updated><title type='text'>pascal, _pascal, __pascal</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Syntax&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;pascal&lt;/span&gt; &lt;data-definition/function-definition&gt; ;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;_pascal&lt;/span&gt; &lt;data-definition/function-definition&gt; ;&lt;br /&gt;__pascal &lt;data-definition/function-definition&gt; ;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;Use the &lt;span style="font-weight:bold;"&gt;pascal, _pascal,&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;__pascal &lt;/span&gt;keywords to declare a variable or a function using a Pascal-style naming convention (the name is in uppercase).&lt;br /&gt;&lt;br /&gt;In addition, pascal declares Pascal-style parameter-passing conventions when applied to a function header (parameters pushed left ot right; the called function cleans up the stack).&lt;br /&gt;In C++ programs, functions declared with the pascal modifer will still be mangled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6515477212033434503?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6515477212033434503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/pascal-pascal-pascal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6515477212033434503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6515477212033434503'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/pascal-pascal-pascal.html' title='pascal, _pascal, __pascal'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5338978022442523428</id><published>2009-05-13T08:12:00.000+03:00</published><updated>2009-05-13T08:16:12.099+03:00</updated><title type='text'>cdecl, _cdecl, __cdecl</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Syntax&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;cdecl&lt;/span&gt; &lt;data/function definition&gt; ;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt; &lt;data/function definition&gt; ;&lt;br /&gt;&lt;br /&gt;__cdecl &lt;data/function definition&gt; ;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;Use a &lt;span style="font-weight:bold;"&gt;cdecl&lt;/span&gt;, &lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt;, or &lt;span style="font-weight:bold;"&gt;__cdecl&lt;/span&gt; modifier to declare a variable or a function using the C-style naming conventions (case-sensitive, with a leading underscore appended). When you use &lt;span style="font-weight:bold;"&gt;cdecl&lt;/span&gt;, &lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt;, or &lt;span style="font-weight:bold;"&gt;__cdecl&lt;/span&gt; in front of a function, it affects how the parameters are passed (parameters are pushed right to left, and the caller cleans up the stack). The &lt;span style="font-weight:bold;"&gt;__cdecl&lt;/span&gt; modifier overrides the compiler directives and IDE options.&lt;br /&gt;The &lt;span style="font-weight:bold;"&gt;cdecl&lt;/span&gt;, &lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt;, and &lt;span style="font-weight:bold;"&gt;__cdecl &lt;/span&gt;keywords are specific to C++Builder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5338978022442523428?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5338978022442523428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/cdecl-cdecl-cdecl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5338978022442523428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5338978022442523428'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/cdecl-cdecl-cdecl.html' title='cdecl, _cdecl, __cdecl'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2846515998589090580</id><published>2009-05-13T08:06:00.002+03:00</published><updated>2009-05-13T08:11:51.021+03:00</updated><title type='text'>_fastcall, __fastcall</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;Modifiers, C++Builder keyword extensions&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Syntax&lt;/span&gt;&lt;br /&gt;return-value &lt;span style="font-weight:bold;"&gt;_fastcall&lt;/span&gt; function-name(parm-list)&lt;br /&gt;return-value &lt;span style="font-weight:bold;"&gt;__fastcall&lt;/span&gt; function-name(parm-list)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;Use the &lt;span style="font-weight:bold;"&gt;__fastcall&lt;/span&gt; modifier to declare functions that expect parameters to be passed in registers. The first three parameters are passed (from left to right) in EAX, EDX, and ECX, if they fit in the register. The registers are not used if the parameter is a floating-point or struct type.&lt;br /&gt;&lt;br /&gt;All form class member functions must use the _&lt;span style="font-weight:bold;"&gt;_fastcall&lt;/span&gt; convention.&lt;br /&gt;&lt;br /&gt;The compiler treats this calling convention as a new language specifier, along the lines of &lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;_pascal&lt;/span&gt;&lt;br /&gt;Functions declared using &lt;span style="font-weight:bold;"&gt;_cdecl&lt;/span&gt; or &lt;span style="font-weight:bold;"&gt;_pascal&lt;/span&gt; cannot also have the _&lt;span style="font-weight:bold;"&gt;fastcall&lt;/span&gt; modifiers because they use the stack to pass parameters. Likewise, the &lt;span style="font-weight:bold;"&gt;__fastcall&lt;/span&gt; modifier cannot be used together with &lt;span style="font-weight:bold;"&gt;_export&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The compiler prefixes the &lt;span style="font-weight:bold;"&gt;__fastcall&lt;/span&gt; function name with an at-sign ("@"). This prefix applies to both unmangled C function names and to mangled C++ function names.&lt;br /&gt;For Microsoft VC++ style &lt;span style="font-weight:bold;"&gt;__fastcall &lt;/span&gt;implementation, see &lt;span style="font-weight:bold;"&gt;__msfastcall&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;__msreturn.&lt;/span&gt;&lt;br /&gt;NB:The _&lt;span style="font-weight:bold;"&gt;_fastcall&lt;/span&gt; modifier is subject to name mangling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2846515998589090580?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2846515998589090580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/fastcall-fastcall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2846515998589090580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2846515998589090580'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/fastcall-fastcall.html' title='_fastcall, __fastcall'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6064689234774487453</id><published>2009-05-13T07:59:00.002+03:00</published><updated>2009-05-13T08:05:22.819+03:00</updated><title type='text'>TClientDataSet::AppendData and TClientDataSet::BeforeGetRecords</title><content type='html'>&lt;span style="font-weight:bold;"&gt;TClientDataSet::AppendData&lt;/span&gt;&lt;br /&gt;Adds a newly fetched packet of records to those already stored in the client dataset.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;void __fastcall&lt;/span&gt; AppendData(&lt;span style="font-weight:bold;"&gt;const&lt;/span&gt; System::OleVariant &amp;Data, &lt;span style="font-weight:bold;"&gt;bool&lt;/span&gt; HitEOF);&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use AppendData to add a newly fetched packet of records from the server application to the client dataset. Data indicates the packet of records to add. HitEOF indicates whether or not the application server encountered the end of the dataset when it fetched the records from the database server.&lt;br /&gt;&lt;br /&gt;Most applications call GetNextPacket instead to fetch a packet of records and automatically add them to those already available. Use AppendData when fetching data packets directly from the application server rather than letting the client dataset fetch data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;TClientDataSet::BeforeGetRecords&lt;/span&gt;&lt;br /&gt;Occurs before the client dataset fetches a data packet from the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;__property&lt;/span&gt; TRemoteEvent BeforeGetRecords = {&lt;span style="font-weight:bold;"&gt;read&lt;/span&gt;=FBeforeGetRecords, &lt;span style="font-weight:bold;"&gt;write&lt;/span&gt;=FBeforeGetRecords};&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;Write a BeforeGetRecords event handler to send custom information to the client dataset’s provider. BeforeGetRecords is part of the mechanism by which a client dataset and a remote provider communicate information about data fetching. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.&lt;br /&gt;When the client dataset fetches data from the application server, the following events occur:&lt;br /&gt;&lt;br /&gt;1.The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant that is passed to the application server as the OwnerData parameter.&lt;br /&gt;2.The provider on the application server receives a BeforeGetRecords event, where it can respond to or change that information before the provider creates a data packet. &lt;br /&gt;3.The provider generates the data packet.&lt;br /&gt;4.The provider receives an AfterGetRecords event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetRecords event handler.&lt;br /&gt;&lt;br /&gt;5.The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider in its AfterGetRecords event handler&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6064689234774487453?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6064689234774487453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetappenddata-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6064689234774487453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6064689234774487453'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetappenddata-and.html' title='TClientDataSet::AppendData and TClientDataSet::BeforeGetRecords'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-655376764972835732</id><published>2009-05-13T07:58:00.000+03:00</published><updated>2009-05-13T07:59:45.505+03:00</updated><title type='text'>TClientDataSet::AfterGetRecords</title><content type='html'>&lt;span style="font-weight:bold;"&gt;TClientDataSet::AfterGetRecords&lt;/span&gt;&lt;br /&gt;Occurs after the client dataset fetches a data packet from the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;__property &lt;/span&gt;TRemoteEvent AfterGetRecords = {&lt;span style="font-weight:bold;"&gt;read&lt;/span&gt;=FAfterGetRecords, &lt;span style="font-weight:bold;"&gt;write&lt;/span&gt;=FAfterGetRecords};&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;Write an AfterGetRecords event handler to respond to custom information returned to the client dataset from a provider’s AfterGetRecords event handler. AfterGetRecords is part of the mechanism by which a client dataset and a remote provider communicate information about data fetching. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.&lt;br /&gt;&lt;br /&gt;When the client dataset fetches data from the application server, the following events occur:&lt;br /&gt;&lt;br /&gt;1.The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant that is passed to the application server as the OwnerData parameter.&lt;br /&gt;2.The provider on the application server receives a BeforeGetRecords event, where it can respond to or change that information before the provider creates a data packet. &lt;br /&gt;3.The provider generates an OnGetData event where it can edit the data before creating a data packet, and then generates the data packet.&lt;br /&gt;&lt;br /&gt;4.The provider receives an AfterGetRecords event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetRecords event handler.&lt;br /&gt;5.The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider in its AfterGetRecords event handler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-655376764972835732?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/655376764972835732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetaftergetrecords.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/655376764972835732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/655376764972835732'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetaftergetrecords.html' title='TClientDataSet::AfterGetRecords'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3264578073729752859</id><published>2009-05-13T07:52:00.000+03:00</published><updated>2009-05-13T07:57:01.645+03:00</updated><title type='text'>TClientDataSet::GetNextPacket</title><content type='html'>&lt;span style="font-weight:bold;"&gt;TClientDataSet::GetNextPacket&lt;/span&gt;&lt;br /&gt;Retrieves the next block of records from the application server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;int __fastcall&lt;/span&gt; GetNextPacket(&lt;span style="font-weight:bold;"&gt;void&lt;/span&gt;);&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Call GetNextPacket to retrieve the next sequential block of records from the application server. To specify the maximum number of records to return in a packet, set the PacketRecords property before calling GetNextPacket. A packet is appended to those records already stored in the Data property.&lt;br /&gt;&lt;br /&gt;GetNextPacket returns the number of records added to Data. If the return value is 0, the client application has already received all available records from the application server.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Warning:&lt;/span&gt;If the client dataset uses a stateless application server, you must use a BeforeGetRecords event handler to ensure that the data packet returns the correct set of records.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;TClientDataSet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;TClientDataSet implements a database-independent dataset.&lt;br /&gt;Unit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;dbclient&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;TClientDataSet encapsulates a database-independent, distributed dataset. A client dataset can be used as a&lt;br /&gt;-Fully-functional, standalone, flat-file dataset for single-tiered database applications. When used in this manner, an application uses the client dataset to read from and write to a user’s hard disk directly, without accessing a database engine.&lt;br /&gt;-Client dataset in the client application portion of a multi-tiered database application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NB:&lt;/span&gt;The two functions described above are not mutually exclusive. A multi-tiered application can be designed to support the option of working with data off-line, using the “briefcase” model. On site, the application uses TClientDataSet to communicate with the application server’s data provider. When a user works off site, the client dataset writes a snapshot of the data to the hard disk.  The application works with this snapshot off site, with the client dataset acting as a flat-file dataset in a single-tiered application.&lt;br /&gt;&lt;br /&gt;The client dataset can communicate with a data provider directly by calling the provider component’s methods. When used in a client application as part of a multi-tiered application, the client dataset passes all calls to the provider through the remote data module’s IAppServer interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3264578073729752859?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3264578073729752859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetgetnextpacket.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3264578073729752859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3264578073729752859'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/tclientdatasetgetnextpacket.html' title='TClientDataSet::GetNextPacket'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6655961833338041841</id><published>2009-05-13T07:48:00.000+03:00</published><updated>2009-05-13T07:51:11.584+03:00</updated><title type='text'>__thread, multithread variables</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Category&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C++Builder keyword extensions&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The keyword &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; is used in multithread programs to preserve a unique copy of global and static class variables. Each program thread maintains a private copy of a &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; variable for each thread.&lt;br /&gt;&lt;br /&gt;The syntax is Type &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; variable__name. For example&lt;br /&gt;&lt;br /&gt; int &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; x;&lt;br /&gt;&lt;br /&gt;declares an integer type variable that will be global but private to each thread in the program in which the statement occurs.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Using thread-local variables&lt;/span&gt;&lt;br /&gt;The thread function and any of the routines it calls have their own local variables, just like any other C++ routines. These routines also can access any global variables. In fact, global variables provide a powerful mechanism for communicating between threads.&lt;br /&gt;Sometimes, however, you may want to use variables that are global to all the routines running in your thread, but not shared with other instances of the same thread class. You can do this by declaring thread-local variables. Make a variable thread-local by adding the &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; modifier to the variable declaration. For example, &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;int __thread&lt;/span&gt; x;&lt;br /&gt;&lt;br /&gt;declares an integer type variable that is private to each thread in the application, but global within each thread.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; modifier can only be used for global (file-scope) and static variables. Pointer and Function variables can’t be thread variables. Types that use copy-on-write semantics, such as AnsiStrings don’t work as thread variables either. A program element that requires runtime initialization or runtime finalization cannot be declared to be a &lt;span style="font-weight:bold;"&gt;__thread&lt;/span&gt; type. &lt;br /&gt;&lt;br /&gt;The following declarations require runtime initialization and are therefore illegal.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;int&lt;/span&gt; f( );&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;int __thread&lt;/span&gt; x = f( );   // illegal&lt;br /&gt;&lt;br /&gt;Instantiation of a class with a user-defined constructor or destructor requires runtime initialization and is therefore illegal:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;class&lt;/span&gt; X  {&lt;br /&gt;&lt;br /&gt;   X( );&lt;br /&gt;   ~X( );&lt;br /&gt;};&lt;br /&gt;X &lt;span style="font-weight:bold;"&gt;__thread &lt;/span&gt;myclass;   // illegal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6655961833338041841?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6655961833338041841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/thread-multithread-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6655961833338041841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6655961833338041841'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/thread-multithread-variables.html' title='__thread, multithread variables'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6444845294484539213</id><published>2009-05-13T07:45:00.000+03:00</published><updated>2009-05-13T07:48:09.994+03:00</updated><title type='text'>Creating and using a client dataset</title><content type='html'>&lt;span style="font-weight:bold;"&gt;TClientDataSet&lt;/span&gt; is a dataset component designed to work without the connectivity support of the Borland Database Engine (BDE) or ActiveX Data Objects (ADO). Instead, it uses MIDAS.DLL, which is much smaller and simpler to install and configure. You don’t use database or ADO connection components with client datasets, because there is no database connection. &lt;br /&gt;Client datasets provide all the data access, editing, navigation, data constraint, and filtering support introduced by TDataSet. However, the application that uses a client dataset must provide the mechanism by which the client dataset reads data and writes updates. Client datasets provide for this in one of the following ways:&lt;br /&gt;&lt;br /&gt;Reading from and writing to a flat file accessed directly from a client dataset component. This is the mechanism used by flat-file database applications. &lt;br /&gt;-Reading from another dataset. Client datasets provide a variety of mechanisms for copying data from other datasets. These are described in Copying data from another dataset.&lt;br /&gt;-Using an IAppServer interface to obtain data from and post updates to a remote application server. This is the mechanism used by clients in a multi-tiered database application. &lt;br /&gt;&lt;br /&gt;These mechanisms can be combined into a single application that employs the “briefcase model”. Users take a snapshot of data, saving it to a flat-file so that they can work on it off-line. Later, the client application applies the changes from the local copy of data to the application server. The application server resolves them with the actual database, and returns errors to the client dataset for handling&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;TClientDataSet&lt;/span&gt;&lt;br /&gt;TClientDataSet implements a database-independent dataset.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Unit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;dbclient&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Description&lt;/span&gt;&lt;br /&gt;TClientDataSet encapsulates a database-independent, distributed dataset. A client dataset can be used as a&lt;br /&gt;&lt;br /&gt;-Fully-functional, standalone, flat-file dataset for single-tiered database applications. When used in this manner, an application uses the client dataset to read from and write to a user’s hard disk directly, without accessing a database engine.&lt;br /&gt;-Client dataset in the client application portion of a multi-tiered database application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NB&lt;/span&gt;:The two functions described above are not mutually exclusive. A multi-tiered application can be designed to support the option of working with data off-line, using the “briefcase” model. On site, the application uses TClientDataSet to communicate with the application server’s data provider. When a user works off site, the client dataset writes a snapshot of the data to the hard disk.  The application works with this snapshot off site, with the client dataset acting as a flat-file dataset in a single-tiered application.&lt;br /&gt;&lt;br /&gt;The client dataset can communicate with a data provider directly by calling the provider component’s methods. When used in a client application as part of a multi-tiered application, the client dataset passes all calls to the provider through the remote data module’s IAppServer interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6444845294484539213?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6444845294484539213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/creating-and-using-client-dataset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6444845294484539213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6444845294484539213'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/05/creating-and-using-client-dataset.html' title='Creating and using a client dataset'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1920157834746287829</id><published>2009-04-30T09:11:00.000+03:00</published><updated>2009-04-30T09:13:53.098+03:00</updated><title type='text'>Using local transactions</title><content type='html'>The BDE supports local transactions against local Paradox, dBASE, Access, and FoxPro tables. From a coding perspective, there is no difference to you between a local transaction and a transaction against a remote database server.&lt;br /&gt;When a transaction is started against a local table, updates performed against the table are logged. Each log record contains the old record buffer for a record. When a transaction is active, records that are updated are locked until the transaction is committed or rolled back. On rollback, old record buffers are applied against updated records to restore them to their pre-update states.&lt;br /&gt;&lt;br /&gt;Local transactions are more limited than transactions against SQL servers or ODBC drivers. In particular, the following limitations apply to local transactions:&lt;br /&gt;&lt;br /&gt;Automatic crash recovery is not provided.&lt;br /&gt;&lt;br /&gt;Data definition statements are not supported.&lt;br /&gt;&lt;br /&gt;Transactions cannot be run against temporary tables.&lt;br /&gt;&lt;br /&gt;For Paradox, local transactions can only be performed on tables with valid indexes. Data cannot be rolled back on Paradox tables that do not have indexes.&lt;br /&gt;&lt;br /&gt;Only a limited number of records can be locked and modified. With Paradox tables, you are limited to 255 records. With dBASE the limit is 100.&lt;br /&gt;&lt;br /&gt;Transactions cannot be run against the BDE ASCII driver.&lt;br /&gt;&lt;br /&gt;TransIsolation level must only be set to tiDirtyRead.&lt;br /&gt;&lt;br /&gt;Closing a cursor on a table during a transaction rolls back the transaction unless:&lt;br /&gt;&lt;br /&gt;Several tables are open.&lt;br /&gt;&lt;br /&gt;The cursor is closed on a table to which no changes were made.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1920157834746287829?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1920157834746287829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-local-transactions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1920157834746287829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1920157834746287829'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-local-transactions.html' title='Using local transactions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6888290039191987864</id><published>2009-04-30T09:06:00.001+03:00</published><updated>2009-04-30T09:08:39.724+03:00</updated><title type='text'>Using passthrough SQL</title><content type='html'>With passthrough SQL, you use a TQuery, TStoredProc, or TUpdateSQL component to send an SQL transaction control statement directly to a remote database server. The BDE does not process the SQL statement. Using passthrough SQL enables you to take direct advantage of the transaction controls offered by your server, especially when those controls are non-standard.&lt;br /&gt;To use passthrough SQL to control a transaction, you must&lt;br /&gt;&lt;br /&gt;Install the proper SQL Links drivers. If you chose the “Typical” installation when installing C++Builder, all SQL Links drivers are already properly installed.&lt;br /&gt; Configure your network protocol correctly. See your network administrator for more information.&lt;br /&gt; Have access to a database on a remote server.&lt;br /&gt; Set SQLPASSTHRU MODE to NOT SHARED using the SQL Explorer. SQLPASSTHRU MODE specifies whether the BDE and passthrough SQL statements can share the same database connections. In most cases, SQLPASSTHRU MODE is set to SHARED AUTOCOMMIT. However, you can’t share database connections when using transaction control statements. For more information about SQLPASSTHRU modes, see the help file for the BDE Administration utility.&lt;br /&gt;&lt;br /&gt;NB:When SQLPASSTHRU MODE is NOT SHARED, you must use separate database components for datasets that pass SQL transaction statements to the server and datasets that do not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6888290039191987864?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6888290039191987864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-passthrough-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6888290039191987864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6888290039191987864'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-passthrough-sql.html' title='Using passthrough SQL'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2708250009888894696</id><published>2009-04-30T09:00:00.001+03:00</published><updated>2009-04-30T09:03:19.091+03:00</updated><title type='text'>Using a database component for transactions</title><content type='html'>When you start a transaction, all subsequent statements that read from and write to the database occur in the context of that transaction. Each statement is considered part of a group. Changes must be successfully committed to the database, or every change made in the group must be undone.&lt;br /&gt;Ideally, a transaction should only last as long as necessary. The longer a transaction is active, the more simultaneous users that access the database, and the more concurrent, simultaneous transactions that start and end during the lifetime of your transaction, the greater the likelihood that your transaction will conflict with another when you attempt to commit your changes.&lt;br /&gt;When using a database component, you code a single transaction as follows:&lt;br /&gt;&lt;br /&gt;1.Start the transaction by calling the database’s StartTransaction method.&lt;br /&gt;&lt;br /&gt;2.Once the transaction is started, all subsequent database actions are considered part of the transaction until the transaction is explicitly terminated. You can determine whether a transaction is in process by checking the database component’s InTransaction property. While the transaction is in process, your view of the data in database tables is determined by you transaction isolation level.&lt;br /&gt;3.When the actions that make up the transaction have all succeeded, you can make the database changes permanent by using the database component’s Commit method.&lt;br /&gt;&lt;br /&gt;Commit is usually attempted in a try...catch statement. That way, if a transaction cannot commit successfully, you can use the catch block to handle the error and retry the operation or to roll back the transaction.&lt;br /&gt;4If an error occurs when making the changes that are part of the transaction, or when trying to commit the transaction, you will want to discard all changes that make up the transaction. To discard these changes, use the database component’s Rollback method.&lt;br /&gt;&lt;br /&gt;Rollback usually occurs in&lt;br /&gt;&lt;br /&gt;Exception handling code when you cannot recover from a database error.&lt;br /&gt; Button or menu event code, such as when a user clicks a Cancel button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2708250009888894696?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2708250009888894696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-database-component-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2708250009888894696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2708250009888894696'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-database-component-for.html' title='Using a database component for transactions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7642145462635941128</id><published>2009-04-30T08:58:00.004+03:00</published><updated>2009-04-30T09:17:24.115+03:00</updated><title type='text'>Explicitly controlling transactions</title><content type='html'>There are two mutually exclusive ways to control transactions explicitly in a BDE-based database application:&lt;br /&gt;&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/using-database-component-for.html"&gt;Use the methods and properties of the database component,&lt;/a&gt;&lt;br /&gt;such as StartTransaction, Commit, Rollback, InTransaction, and TransIsolation. The main advantage to using the methods and properties of a database component to control transactions is that it provides a clean, portable application that is not dependent on a particular database or server.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/using-passthrough-sql.html"&gt;Use passthrough SQL&lt;/a&gt;in a query component to pass SQL statements directly to remote SQL or ODBC servers. For more information about query components, see "Working with queries.” The main advantage to passthrough SQL is that you can use the advanced transaction management capabilities of a particular database server, such as schema caching. To understand the advantages of your server’s transaction management model, see your database server documentation.&lt;br /&gt;One-tiered applications can‘t use passthrough SQL. You can use the database component to create explicit transactions for local databases. However, there are limitations to using local transactions. For more information on using,&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/using-local-transactions.html"&gt; local transactions&lt;/a&gt;.&lt;br /&gt;When writing two-tiered applications (which require SQL links), you can use either a database component or passthrough SQL to manage transactions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7642145462635941128?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7642145462635941128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/explicitly-controlling-transactions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7642145462635941128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7642145462635941128'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/explicitly-controlling-transactions.html' title='Explicitly controlling transactions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7396278681274661271</id><published>2009-04-28T17:22:00.000+03:00</published><updated>2009-04-28T17:23:46.368+03:00</updated><title type='text'>Initializing the thread</title><content type='html'>Use the constructor to initialize your new thread class. This is where you can assign a default priority for your thread and indicate whether it should be freed automatically when it finishes executing.&lt;br /&gt;&lt;br /&gt;Assigning a default priority&lt;br /&gt;&lt;br /&gt;Priority indicates how much preference the thread gets when the operating system schedules CPU time among all the threads in your application. Use a high priority thread to handle time critical tasks, and a low priority thread to perform other tasks. To indicate the priority of your thread object, set the! Priority property. Priority values fall along a seven point scale, as described in the following table:&lt;br /&gt;&lt;br /&gt;Value Priority&lt;br /&gt;tpIdle The thread executes only when the system is idle. Windows won't interrupt other threads to execute a thread with tpIdle priority.&lt;br /&gt;tpLowest The thread's priority is two points below normal.&lt;br /&gt;tpLower The thread's priority is one point below normal.&lt;br /&gt;tpNormal The thread has normal priority.&lt;br /&gt;tpHigher The thread's priority is one point above normal.&lt;br /&gt;tpHighest The thread's priority is two points above normal.&lt;br /&gt;tpTimeCritical The thread gets highest priority.&lt;br /&gt;Warning:  Boosting the thread priority of a CPU intensive operation may “starve” other threads in the application. Only apply priority boosts to threads that spend most of their time waiting for external events.&lt;br /&gt;&lt;br /&gt;The following code shows the constructor of a low-priority thread that performs background tasks which should not interfere with the rest of the application’s performance:&lt;br /&gt;&lt;br /&gt;//---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;__fastcall TMyThread::TMyThread(bool CreateSuspended): TThread(CreateSuspended)&lt;br /&gt;{&lt;br /&gt;  Priority = tpIdle;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Indicating when threads are freed&lt;br /&gt;&lt;br /&gt;Usually, when threads finish their operation, they can simply be freed. In this case, it is easiest to let the thread object free itself. To do this, set the FreeOnTerminate property to true.&lt;br /&gt;There are times, however, when the termination of a thread must be coordinated with other threads. For example, you may be waiting for one thread to return a value before performing an action in another thread. To do this, you do not want to free the first thread until the second has received the return value. You can handle this situation by setting FreeOnTerminate to false and then explicitly freeing the first thread from the second.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7396278681274661271?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7396278681274661271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/initializing-thread.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7396278681274661271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7396278681274661271'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/initializing-thread.html' title='Initializing the thread'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3679488764867982391</id><published>2009-04-28T17:02:00.002+03:00</published><updated>2009-04-28T17:22:38.922+03:00</updated><title type='text'>Distributing database applications</title><content type='html'>C++Builder provides support for creating distributed database applications using the MIDAS technology. This powerful technology includes a coordinated set of components that allow you to build a wide variety of multi-tiered database applications. Distributed database applications can be built on a variety of communications protocols, including DCOM, TCP/IP, and OLEnterprise.&lt;br /&gt;&lt;br /&gt;Creating multi-tiered applications&lt;br /&gt;A multi-tiered client/server application is partitioned into logical units which run in conjunction on separate machines. Multi-tiered applications share data and communicate with one another over a local-area network or even over the Internet. They provide many benefits, such as centralized business logic and thin client applications.&lt;br /&gt;In its simplest form, sometimes called the “three-tiered model,” a multi-tiered application is partitioned into thirds:&lt;br /&gt;&lt;br /&gt;Client application: provides a user interface on the user’s machine.&lt;br /&gt; Application server: resides in a central networking location accessible to all clients and provides common data services.&lt;br /&gt; Remote database server: provides the relational database management system (RDBMS).&lt;br /&gt;&lt;br /&gt;In this three-tiered model, the application server manages the flow of data between clients and the remote database server, so it is sometimes called a “data broker.” With C++Builder you usually only create the application server and its clients, although, if you are really ambitious, you could create your own database back end as well.&lt;br /&gt;In more complex multi-tiered applications, additional services reside between a client and a remote database server. For example, there might be a security services broker to handle secure Internet transactions, or bridge services to handle sharing of data with databases on platforms not directly supported by C++Builder.&lt;br /&gt;&lt;br /&gt;C++Builder support for multi-tiered applications is based on the Multi-tier Distributed Application Services Suite (MIDAS)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3679488764867982391?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3679488764867982391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/distributing-database-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3679488764867982391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3679488764867982391'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/distributing-database-applications.html' title='Distributing database applications'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7589892947871769735</id><published>2009-04-27T12:07:00.001+03:00</published><updated>2009-04-27T12:10:36.068+03:00</updated><title type='text'>Understanding MIDAS technology</title><content type='html'>MIDAS provides the mechanism by which client applications and application servers communicate database information. Using MIDAS requires MIDAS.DLL, which is used by both client and server applications to manage datasets stored as data packets. Building MIDAS applications may also require the SQL explorer to help in database administration and to import server constraints into the Data Dictionary so that they can be checked at any level of the multi-tiered application.&lt;br /&gt;&lt;br /&gt;Note:You must purchase server licenses for deploying your MIDAS applications.&lt;br /&gt;MIDAS-based multi-tiered applications use the components on the MIDAS page of the component palette, plus a remote data module that is created by a wizard on the Multitier page of the New Items dialog.&lt;br /&gt;&lt;br /&gt;remote data modules&lt;br /&gt;Specialized data modules that work with a COM Automation server to give client applications access to any providers they contain. Used on the application server.&lt;br /&gt;&lt;br /&gt;provider component&lt;br /&gt;A data broker that provides data by creating data packets and resolves client updates. Used on the application server.&lt;br /&gt;&lt;br /&gt;client dataset component&lt;br /&gt;A specialized dataset that uses MIDAS.DLL to manage data stored in data packets.&lt;br /&gt;&lt;br /&gt;connection components&lt;br /&gt;A family of components that locate the server, form connections, and make the IAppServer interface available to client datasets. Each connection component is specialized to use a particular communications protocol.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7589892947871769735?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7589892947871769735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/understanding-midas-technology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7589892947871769735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7589892947871769735'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/understanding-midas-technology.html' title='Understanding MIDAS technology'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8495837425051904325</id><published>2009-04-27T12:03:00.000+03:00</published><updated>2009-04-27T12:04:48.344+03:00</updated><title type='text'>Granting permission to access and launch the application server</title><content type='html'>Requests from the InternetExpress application appear to the application server as originating from a guest account with the name IUSR_computername, where computername is the name of the system running the Web application. By default, this account does not have access or launch permission for the application server. If you try to use the Web application without granting these permissions, when the Web browser tries to load the requested page it times out with EOLE_ACCESS_ERROR.&lt;br /&gt;Note: Because the application server runs under this guest account, it can’t be shut down by other accounts.&lt;br /&gt;&lt;br /&gt;To grant the Web application access and launch permissions, run DCOMCnfg.exe, which is located in the System32 directory of the machine that runs the application server. The following steps describe how to configure your application server:&lt;br /&gt;&lt;br /&gt;1.When you run DCOMCnfg, select your application server in the list of applications on the Applications page. &lt;br /&gt;&lt;br /&gt;2.Click the Properties button. When the dialog changes, select the Security page.&lt;br /&gt;&lt;br /&gt;3.Select Use Custom Access Permissions, and press the Edit button. Add the name IUSR_computername to the list of accounts with access permission, where computername is the name of the machine that runs the Web application.&lt;br /&gt;&lt;br /&gt;4.Select Use Custom Launch Permissions, and press the Edit button. Add IUSR_computername to this list as well.&lt;br /&gt;&lt;br /&gt;5.Click the Apply button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8495837425051904325?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8495837425051904325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/granting-permission-to-access-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8495837425051904325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8495837425051904325'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/granting-permission-to-access-and.html' title='Granting permission to access and launch the application server'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7352734458505221803</id><published>2009-04-27T11:55:00.002+03:00</published><updated>2009-04-27T12:00:37.756+03:00</updated><title type='text'>Building an InternetExpress application</title><content type='html'>The following steps describe how to build a Web application that creates HTML pages for allowing users to interact with the data from an application server via a javascript-enabled Web browser.&lt;br /&gt;1.Choose File|New to display the New Items dialog box, and on the New page select Web Server application.&lt;br /&gt;&lt;br /&gt;2.From the MIDAS page of the component palette, add a connection component to the Web Module that appears when you create a new Web server application. The type of connection component you add depends on the communication protocol you want to use.&lt;br /&gt;&lt;br /&gt;3.Set properties on your connection component to specify the application server with which it should establish a connection. &lt;br /&gt;&lt;br /&gt;4.Instead of a client dataset, add an XML broker from the InternetExpress page of the component palette to the Web module. Like TClientDataSet, TXMLBroker represents the data from a provider on the application server and interacts with the application server through its IAppServer interface. However, unlike client datasets, XML brokers request data packets as XML instead of as OleVariants and interact with InternetExpress components instead of data controls.&lt;br /&gt;&lt;br /&gt;5.Set the RemoteServer property of the XML broker to point to the connection component you added in step 2. Set the ProviderName property to indicate the provider on the application server that provides data and applies updates. &lt;br /&gt;&lt;br /&gt;6.Add a MIDAS page producer to the Web module for each separate page that users will see in their browsers. For each MIDAS page producer, you must set the IncludePathURL property to indicate where it can find the javascript libraries that augment its generated HTML controls with data management capabilities.&lt;br /&gt;&lt;br /&gt;7.Right-click a Web page and choose Action Editor to display the Action editor. Add action items for every message you want to handle from browsers. Associate the page producers you added in step 6 with these actions by setting their Producer property or writing code in an OnAction event handler.&lt;br /&gt;&lt;br /&gt;8.Double-click each Web page to display the Web Page editor. (You can also display this editor by clicking the ellipsis button in the Object Inspector next to the WebPageItems property.) In this editor you can add Web Items to design the pages that users see in their browsers.&lt;br /&gt;&lt;br /&gt;9.Build your Web application. Once you install this application with your Web server, browsers can call it by specifying the name of the application as the scriptname portion of the URL and the name of the Web Page component as the pathinfo portion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7352734458505221803?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7352734458505221803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/building-internetexpress-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7352734458505221803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7352734458505221803'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/building-internetexpress-application.html' title='Building an InternetExpress application'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7906922761470648196</id><published>2009-04-27T11:50:00.001+03:00</published><updated>2009-04-27T11:53:06.571+03:00</updated><title type='text'>Using the javascript libraries</title><content type='html'>The HTML pages generated by the InternetExpress components and the Web items they contain make use of several javascript libraries that ship with C++Builder:&lt;br /&gt;&lt;br /&gt;xmldom.js &lt;br /&gt;This library is a DOM-compatible XML parser written in javascript. It allows parsers that do not support XML to use XML data packets. Note that this does not include support for XML Islands, which are supported by IE5 and later.&lt;br /&gt;&lt;br /&gt;xmldb.js&lt;br /&gt;This library defines data access classes that manage XML data packets and XML delta packets.&lt;br /&gt;&lt;br /&gt;xmldisp.js&lt;br /&gt;This library defines classes that associate the data access classes in xmldb with HTML controls in the HTML page.&lt;br /&gt;&lt;br /&gt;xmlerrdisp.js&lt;br /&gt;This library defines classes that can be used when reconciling update errors. These classes are not used by any of the built-in InternetExpress components, but are useful when writing a Reconcile producer.&lt;br /&gt;&lt;br /&gt;xmlshow.js&lt;br /&gt;This library includes functions to display formatted XML data packets and XML delta packets. This library is not used by any of the InternetExpress components, but is useful when debugging.&lt;br /&gt;&lt;br /&gt;These libraries can be found in the Source/Webmidas directory. Once you have installed these libraries, you must set the IncludePathURL property of all MIDAS page producers to indicate where they can be found.&lt;br /&gt;It is possible to write your own HTML pages using the javascript classes provided in these libraries instead of using Web items to generate your Web pages. However, you must ensure that your code does not do anything illegal, as these classes include minimal error checking (so as to minimize the size of the generated Web pages). &lt;br /&gt;&lt;br /&gt;The classes in the javascript libraries are an evolving standard, and are updated regularly. If you want to use them directly rather than relying on Web items to generate the javascript code, you can get the latest versions and documentation of how to use them from CodeCentral available through community.borland.com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7906922761470648196?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7906922761470648196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-javascript-libraries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7906922761470648196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7906922761470648196'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-javascript-libraries.html' title='Using the javascript libraries'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7036898442149200640</id><published>2009-04-27T11:46:00.001+03:00</published><updated>2009-04-27T11:49:46.193+03:00</updated><title type='text'>Creating the client application</title><content type='html'>In most regards, creating a multi-tiered client application is similar to creating a traditional two-tiered client. The major differences are that a multi-tiered client uses&lt;br /&gt;&lt;br /&gt;A connection component to establish a conduit to the application server.&lt;br /&gt;One or more TClientDataSet components to link to a data provider on the application server. Data-aware controls on the client are connected through data source components to these client datasets instead of TTable, TQuery, TStoredProc or TADODataSet components.&lt;br /&gt;&lt;br /&gt;To create a multi-tiered client application, start a new project and follow these steps:&lt;br /&gt;1.Add a new data module to the project.&lt;br /&gt;&lt;br /&gt;2.Place a connection component on the data module. The type of connection component you add depends on the communication protocol you want to use.&lt;br /&gt;&lt;br /&gt;3.Set properties on your connection component to specify the application server with which it should establish a connection. To learn more about setting up the connection component.&lt;br /&gt;&lt;br /&gt;4.Set the other connection component properties as needed for your application. For example, you might set the ObjectBroker property to allow the connection component to choose dynamically from several servers. For more information about using the connection components.&lt;br /&gt;&lt;br /&gt;5.Place as many TClientDataSet components as needed on the data module, and set the RemoteServer property for each component to the name of the connection component you placed in Step 2.&lt;br /&gt;&lt;br /&gt;6.Set the ProviderName property for each TClientDataSet component. If your connection component is connected to the application server at design time, you can choose available application server providers from the ProviderName property’s drop-down list.&lt;br /&gt;&lt;br /&gt;7.Create the client application in much the same way you would create any other database application. You will probably want to use some of the special features of client datasets that support their interaction with the provider components on the application server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7036898442149200640?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7036898442149200640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/creating-client-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7036898442149200640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7036898442149200640'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/creating-client-application.html' title='Creating the client application'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5007186477623418810</id><published>2009-04-27T11:44:00.000+03:00</published><updated>2009-04-27T11:46:30.943+03:00</updated><title type='text'>Creating an Active Form for the client application</title><content type='html'>1.Because the client application will be deployed as an ActiveX control, you must have a Web server that runs on the same system as the client application. You can use a ready-made server such as Microsoft’s Personal Web server or you can write your own using the socket components described in "Working with sockets.”&lt;br /&gt;&lt;br /&gt;2.Create the client application following the steps described in "Creating the client application.” except start by choosing File|New|Active Form, rather than beginning the client project as an ordinary C++Builder project.&lt;br /&gt;&lt;br /&gt;3.If your client application uses a data module, add a call to explicitly create the data module in the active form initialization.&lt;br /&gt;&lt;br /&gt;4.When your client application is finished, compile the project, and select Project | Web Deployment Options. In the Web Deployment Options dialog, you must do the following:&lt;br /&gt;&lt;br /&gt;-On the Project page, specify the Target directory, the URL for the target directory, and the HTML directory. Typically, the Target directory and the HTML directory will be the same as the projects directory for your Web Server. The target URL is typically the name of the server machine that is specified in the Windows Network|DNS settings.&lt;br /&gt;-On the Additional Files page, include midas.dll with your client application.&lt;br /&gt;&lt;br /&gt;5.Finally, select Project|WebDeploy to deploy the client application as an active form.&lt;br /&gt;&lt;br /&gt;Any Web browser that can run Active forms can run your client application by specifying the .HTM file that was created when you deployed the client application. This .HTM file has the same name as your client application project, and appears in the directory specified as the Target directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5007186477623418810?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5007186477623418810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/creating-active-form-for-client.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5007186477623418810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5007186477623418810'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/creating-active-form-for-client.html' title='Creating an Active Form for the client application'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-625366866617137578</id><published>2009-04-27T11:38:00.002+03:00</published><updated>2009-04-27T11:42:36.419+03:00</updated><title type='text'>Creating the application server</title><content type='html'>You create an application server very much as you create most database applications. The major difference is that the application server includes a dataset provider.&lt;br /&gt;To create an application server, start a new project, save it, and follow these steps:&lt;br /&gt;&lt;br /&gt;1.Add a new remote data module to the project. From the main menu, choose File|New. Choose the Multitier page in the new items dialog, and select &lt;br /&gt;&lt;br /&gt;Remote Data Module if you are creating a COM Automation server that clients access using DCOM, HTTP, or sockets.&lt;br /&gt;Transactional Data Module if you are creating a remote data module that runs under MTS or COM+. Connections can be formed using DCOM, HTTP, or sockets. However, only DCOM supports the security services.&lt;br /&gt;&lt;br /&gt;NB:When you add a remote data module to your project, the Wizard also creates a special COM Automation object that contains a reference to the remote data module and uses it to look for providers. This object is called the implementation object.&lt;br /&gt;&lt;br /&gt;2.Place the appropriate dataset components on the data module and set them up to access the database server.&lt;br /&gt;&lt;br /&gt;3.Place a TDataSetProvider component on the data module for each dataset. This provider is required for brokering client requests and packaging data.&lt;br /&gt;&lt;br /&gt;4.Set the DataSet property for each provider component to the name of the dataset to access. There are additional properties that you can set for the provider.&lt;br /&gt;&lt;br /&gt;5.Write application server code to implement events, shared business rules, shared data validation, and shared security. You may want to extend the application server’s interface to provide additional ways that the client application can call the server.&lt;br /&gt;&lt;br /&gt;6.Save, compile, and register or install the application server. &lt;br /&gt;When the application server uses DCOM, HTTP, or sockets as a communication protocol, it acts as an Automation server and must be registered like any other ActiveX or COM server.&lt;br /&gt;&lt;br /&gt;If you are using a transactional data module, you do not register the application server. Instead, you install it with MTS or COM+.&lt;br /&gt;&lt;br /&gt;7.If your server application does not use DCOM, you must install the runtime software that receives client messages, instantiates the remote data module, and marshals interface calls.&lt;br /&gt;&lt;br /&gt;For TCP/IP sockets this is a socket dispatcher application, Scktsrvr.exe.&lt;br /&gt;For HTTP connections this is httpsrvr.dll, an ISAPI/NSAPI DLL that must be installed with your Web server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-625366866617137578?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/625366866617137578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/creating-application-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/625366866617137578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/625366866617137578'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/creating-application-server.html' title='Creating the application server'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4705650618540043739</id><published>2009-04-27T11:37:00.001+03:00</published><updated>2009-04-27T11:44:44.339+03:00</updated><title type='text'>Distributing a client application as an ActiveX control</title><content type='html'>The MIDAS architecture can be combined with C++Builder’s ActiveX features to distribute a MIDAS client application as an ActiveX control.&lt;br /&gt;When you distribute your client application as an ActiveX control,&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/creating-application-server.html"&gt;create the application server&lt;/a&gt;  as you would for any other multi-tiered application. &lt;br /&gt;When creating the client application, you must use an Active Form as the basis instead of an ordinary form.&lt;br /&gt;&lt;br /&gt;Once you have built and deployed your client application, it can be accessed from any ActiveX-enabled Web browser on another machine. For a Web browser to successfully launch your client application, the Web server must be running on the machine that has the client application.&lt;br /&gt;If the client application uses DCOM to communicate between the client application and the application server, the machine with the Web browser must be enabled to work with DCOM. If the machine with the Web browser is a Windows 95 machine, it must have installed DCOM95, which is available from Microsoft&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4705650618540043739?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4705650618540043739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/distributing-client-application-as_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4705650618540043739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4705650618540043739'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/distributing-client-application-as_27.html' title='Distributing a client application as an ActiveX control'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6292254090904404378</id><published>2009-04-27T11:33:00.004+03:00</published><updated>2009-04-27T12:13:40.810+03:00</updated><title type='text'>Building Web applications using InternetExpress</title><content type='html'>MIDAS clients can request that the application server provide data packets that are coded in XML instead of OleVariants. By combining XML-coded data packets, special&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/using-javascript-libraries.html"&gt;javascript libraries &lt;/a&gt;  of database functions, and C++Builder’s Web server application support, you can create thin client applications that can be accessed using a Web browser that supports javascript. These applications make up C++Builder’s InternetExpress support.&lt;br /&gt;&lt;br /&gt;Before&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/building-internetexpress-application.html"&gt; building an InternetExpress application,&lt;/a&gt;, you should understand C++Builder’s Web server application architecture and the MIDAS database architecture.&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/understanding-midas-technology.html"&gt;Understanding MIDAS technology.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On the InternetExpress page of the component palette, you can find a set of components that extend this Web server application architecture to act as a MIDAS client. Using these components, the Web application generates HTML pages that contain a mixture of HTML, XML, and javascript. The HTML governs the layout and appearance of the pages seen by end users in their browsers. The XML encodes the data packets and delta packets that represent database information. The javascript allows the HTML controls to interpret and manipulate the data in these XML data packets.&lt;br /&gt;&lt;br /&gt;If the InternetExpress application uses DCOM to connect to the application server, you must take additional steps to ensure that the application server&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/granting-permission-to-access-and.html"&gt;grants access and launch permissions &lt;/a&gt; to its clients. &lt;br /&gt;&lt;br /&gt;Tip:You can use the components on the InternetExpress page to build Web server applications with “live” data even if you do not have an application server. Simply add the provider and its dataset to the Web module.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6292254090904404378?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6292254090904404378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/building-web-applications-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6292254090904404378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6292254090904404378'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/building-web-applications-using.html' title='Building Web applications using InternetExpress'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1402451118193162471</id><published>2009-04-27T11:27:00.001+03:00</published><updated>2009-04-27T11:30:01.209+03:00</updated><title type='text'>Distributing a client application as an ActiveX control</title><content type='html'>The MIDAS architecture can be combined with C++Builder’s ActiveX features to distribute a MIDAS client application as an ActiveX control.&lt;br /&gt;When you distribute your client application as an ActiveX control, create the application server as you would for any other multi-tiered application. &lt;br /&gt;&lt;br /&gt;When creating the client application, you must use an Active Form as the basis instead of an ordinary form.&lt;br /&gt;Once you have built and deployed your client application, it can be accessed from any ActiveX-enabled Web browser on another machine. For a Web browser to successfully launch your client application, the Web server must be running on the machine that has the client application.&lt;br /&gt;If the client application uses DCOM to communicate between the client application and the application server, the machine with the Web browser must be enabled to work with DCOM. If the machine with the Web browser is a Windows 95 machine, it must have installed DCOM95, which is available from Microsoft.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1402451118193162471?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1402451118193162471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/distributing-client-application-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1402451118193162471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1402451118193162471'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/distributing-client-application-as.html' title='Distributing a client application as an ActiveX control'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5637593422703527062</id><published>2009-04-27T11:25:00.002+03:00</published><updated>2009-04-27T11:36:57.213+03:00</updated><title type='text'>Writing MIDAS Web applications</title><content type='html'>If you want to create Web-based clients for your multi-tiered database application, you must replace the client tier with a special Web applications that acts simultaneously as a client to the application server and as a Web server application that is installed with a Web server on the same machine. &lt;br /&gt;There are two approaches that you can take to build the MIDAS Web application: &lt;br /&gt;&lt;br /&gt;You can combine the MIDAS architecture with C++Builder’s ActiveX support to &lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/distributing-client-application-as.html"&gt;distribute a MIDAS client application as an ActiveX control&lt;/a&gt;.&lt;br /&gt;This allows any browser that supports ActiveX to run your client application as an in-process server.&lt;br /&gt; You can use XML data packets to &lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/building-web-applications-using.html"&gt;build an InternetExpress application.&lt;/a&gt; This allows browsers that supports javascript to interact with your client application through html pages.&lt;br /&gt;&lt;br /&gt;These two approaches are very different. Which one you choose depends on the following considerations:&lt;br /&gt;&lt;br /&gt;Each approach relies on a different technology (ActiveX vs. javascript and XML). Consider what systems your end users will use. The first approach requires a browser to support ActiveX (which limits clients to a Windows platform). The second approach requires a browser to support javascript and the DHTML capabilities introduced by Netscape 4 and Internet Explorer 4.&lt;br /&gt; ActiveX controls must be downloaded to the browser to act as an in-process server. As a result, the clients using an ActiveX approach require much more memory than the clients of an HTML-based application.&lt;br /&gt;&lt;br /&gt;The InternetExpress approach can be integrated with other HTML pages. An ActiveX client must run in a separate window.&lt;br /&gt; The InternetExpress approach uses standard HTTP, thereby avoiding any firewall issues that confront an ActiveX application.&lt;br /&gt; The ActiveX approach provides greater flexibility in how you program your application. You are not limited by the capabilities of the javascript libraries. The client datasets used in the ActiveX approach surface more features (such as filters, ranges, aggregation, optional parameters, delayed fetching of BLOBs or nested details, and so on) than the XML brokers used in the InternetExpress approach.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5637593422703527062?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5637593422703527062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/writing-midas-web-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5637593422703527062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5637593422703527062'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/writing-midas-web-applications.html' title='Writing MIDAS Web applications'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4910155189387716608</id><published>2009-04-27T11:12:00.002+03:00</published><updated>2009-04-27T11:20:00.819+03:00</updated><title type='text'>Requesting data from an application server</title><content type='html'>The following table lists the properties and methods of TClientDataSet that determine how data is fetched from an application server in a multi-tiered application:&lt;br /&gt;FetchOnDemand property &lt;br /&gt;Determines whether or not a client dataset automatically fetches data as needed, or relies on the application to call the client dataset’s GetNextPacket, FetchBlobs, and FetchDetails functions to retrieve additional data.&lt;br /&gt;&lt;br /&gt;PacketRecords property &lt;br /&gt;Specifies the type or number of records to return in each data packet.&lt;br /&gt;&lt;br /&gt;GetNextPacket method&lt;br /&gt;Fetches the next data packet from the application server.&lt;br /&gt;&lt;br /&gt;FetchBlobs method&lt;br /&gt;Fetches any BLOB fields for the current record when the application server does not include BLOB data automatically.&lt;br /&gt;&lt;br /&gt;FetchDetails method&lt;br /&gt;Fetches nested detail datasets for the current record when the application server does not include these in data packets automatically.&lt;br /&gt;By default, a client dataset retrieves all records from the application server. You can control how data is retrieved using PacketRecords and FetchOnDemand.&lt;br /&gt;PacketRecords specifies either how many records to fetch at a time, or the type of records to return. By default, PacketRecords is set to -1, which means that all available records are fetched at once, either when the application is first opened, or the application explicitly calls GetNextPacket. When PacketRecords is -1, then after it first fetches data, a client dataset never needs to fetch more data because it already has all available records. &lt;br /&gt;&lt;br /&gt;To fetch records in small batches, set PacketRecords to the number of records to fetch. For example, the following statement sets the size of each data packet to ten records:&lt;br /&gt;&lt;br /&gt;ClientDataSet1-&gt;PacketRecords = 10;&lt;br /&gt;&lt;br /&gt;This process of fetching records in batches is called “incremental fetching”. Client datasets use incremental fetching when PacketRecords is greater than zero. By default, the client dataset calls GetNextPacket to fetch data as needed. Newly fetched packets are appended to the end of the data already in the client dataset.&lt;br /&gt;GetNextPacket returns the number of records it fetches. If the return value is the same as PacketRecords, the end of available records was not encountered. If the return value is greater than 0 but less than PacketRecords, the last record was reached during the fetch operation. If GetNextPacket returns 0, then there are no more records to fetch.&lt;br /&gt;&lt;br /&gt;Note:Incremental fetching only works if the remote data module preserves state information. That is, you must not be using MTS, and the remote data module must be configured so that each client application has its own data module instance.&lt;br /&gt;You can also use PacketRecords to fetch metadata information about a database from the application server. To retrieve metadata information, set PacketRecords to 0.&lt;br /&gt;Automatic fetching of records is controlled by the FetchOnDemand property. When FetchOnDemand is true (the default), automatic fetching is enabled. To prevent automatic fetching of records as needed, set FetchOnDemand to false. When FetchOnDemand is false, the application must explicitly call GetNextPacket to fetch records. &lt;br /&gt;&lt;br /&gt;Applications that need to represent extremely large read-only datasets can turn off FetchOnDemand to ensure that the client datasets do not try to load more data than can fit into memory. Between fetches, the client dataset frees its cache using the EmptyDataSet method. This approach, however, does not work well when the client must post updates to the application server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4910155189387716608?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4910155189387716608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/requesting-data-from-application-server.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4910155189387716608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4910155189387716608'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/requesting-data-from-application-server.html' title='Requesting data from an application server'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-170202610897278537</id><published>2009-04-27T11:10:00.001+03:00</published><updated>2009-04-27T11:25:07.615+03:00</updated><title type='text'>Supporting state information in remote data modules</title><content type='html'>The IAppServer interface, which controls all communication between client datasets and providers on the application server, is mostly stateless. When an application is stateless, it does not “remember” anything that happened in previous calls by the client. This stateless quality is useful if you are pooling database connections in a transactional data module, because your application server does not need to distinguish between database connections for persistent information such as record currency. Similarly, this stateless quality is important when you are sharing remote data module instances between many clients, as occurs with just-in-time activation or object pooling.&lt;br /&gt;&lt;br /&gt;However, there are times when you want to maintain state information between calls to the application server. For example, when requesting data using &lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/requesting-data-from-application-server.html"&gt; incremental fetching&lt;/a&gt;,the provider on the application server must “remember” information from previous calls (the current record).&lt;br /&gt;This is not a problem if the remote data module is configured so that each client has its own instance. When each client has its own instance of the remote data module, there are no other clients to change the state of the data module between client calls.&lt;br /&gt;&lt;br /&gt;However, it is reasonable to want the benefits of sharing remote data module instances while still managing persistent state information. For example, you may need to use incremental fetching to display a dataset that is too large to fit in memory at one time.&lt;br /&gt;Before and after any calls to the IAppServer interface that the client dataset sends to the application server (AS_&lt;br /&gt;ApplyUpdates, AS_Execute, AS_GetParams, AS_GetRecords, or AS_RowRequest), it receives an event where it can send or retrieve custom state information. Similarly, before and after providers respond to these client-generated calls, they receive events where they can retrieve or send custom state information. Using this mechanism, you can communicate persistent state information between client applications and the application server, even if the application server is stateless. For example, to enable incremental fetching in a stateless application server, you can do the following:&lt;br /&gt;&lt;br /&gt;Use the client dataset’s BeforeGetRecords event to send the key value of the last record to the application server:&lt;br /&gt;&lt;br /&gt;TDataModule1::ClientDataSet1BeforeGetRecords(TObject *Sender; OleVariant &amp;OwnerData)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;  TClientDataSet *pDS = (TClientDataSet *)Sender;&lt;br /&gt;  if (!pDS-&gt;Active)&lt;br /&gt;    return;&lt;br /&gt;  void *CurRecord = pDS-&gt;GetBookmark(); // save current record&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;    // locate the last record in the current packet. Note this only works if FetchOnDemand&lt;br /&gt;    // is False. If FetchOnDemand is True, you can save the key value of the last record&lt;br /&gt;    // fetch in an AfterGetRecords event handler and use that instead&lt;br /&gt;    pDS-&gt;Last(); // locate the last record in the new packet&lt;br /&gt;&lt;br /&gt;    OwnerData = pDS-&gt;FieldValues["Key"]; // Send key value for the last record to app server&lt;br /&gt;    pDS-&gt;GotoBookmark(CurRecord); // return to current record&lt;br /&gt;  }&lt;br /&gt;  __finally&lt;br /&gt;  {&lt;br /&gt;    pDS-&gt;FreeBookmark(CurRecord);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;On the server, use the provider’s BeforeGetRecords event to locate the appropriate set of records:&lt;br /&gt;&lt;br /&gt;TRemoteDataModule1::Provider1BeforeGetRecords(TObject *Sender, OleVariant &amp;OwnerData)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;  TLocateOptions opts;&lt;br /&gt;  if (!VarIsEmpty(OwnerData))&lt;br /&gt;  {&lt;br /&gt;    TDataSet *pDS = ((TDataSetProvider *)Sender)-&gt;DataSet;&lt;br /&gt;    if (pDS-&gt;Locate("Key", OwnerData, opts))&lt;br /&gt;      pDS-&gt;Next;&lt;br /&gt;}&lt;br /&gt;&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/requesting-data-from-application-server.html"&gt; incremental fetching&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-170202610897278537?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/170202610897278537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/supporting-state-information-in-remote.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/170202610897278537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/170202610897278537'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/supporting-state-information-in-remote.html' title='Supporting state information in remote data modules'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1714120810748722141</id><published>2009-04-27T11:03:00.001+03:00</published><updated>2009-04-27T11:03:26.905+03:00</updated><title type='text'>Applying updates for master/detail tables</title><content type='html'>When you apply updates for master/detail tables, the order in which you list datasets to update is significant. Generally you should always update master tables before detail tables, except when handling deleted records. In complex master/detail relationships where the detail table for one relationship is the master table for another detail table, the same rule applies.&lt;br /&gt;You can update master/detail tables at the database or dataset component levels. For purposes of control (and of creating explicitly self-documented code), you should apply updates at the dataset level. The following example illustrates how you should code cached updates to two tables, Master and Detail, involved in a master/detail relationship:&lt;br /&gt;&lt;br /&gt;Database1-&gt;StartTransaction();&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;  Master-&gt;ApplyUpdates();&lt;br /&gt;  Detail-&gt;ApplyUpdates();&lt;br /&gt;  Database1-&gt;Commit();&lt;br /&gt;}&lt;br /&gt;catch(...)&lt;br /&gt;{&lt;br /&gt;  Database1-&gt;Rollback();&lt;br /&gt;  throw;&lt;br /&gt;}&lt;br /&gt;Master-&gt;CommitUpdates();&lt;br /&gt;Detail-&gt;CommitUpdates();&lt;br /&gt;&lt;br /&gt;If an error occurs during the application of updates, this code also leaves both the cache and the underlying data in the database tables in the same state they were in before the calls to ApplyUpdates.&lt;br /&gt;If an exception is thrown during the call to Master-&gt;ApplyUpdates, it is handled like the single dataset case previously described. Suppose, however, that the call to Master-&gt;ApplyUpdates succeeds, and the subsequent call to Detail-&gt;ApplyUpdates fails. In this case, the changes are already applied to the master table. Because all data is updated inside a database transaction, however, even the changes to the master table are rolled back when Database1-&gt;Rollback is called in the catch block. Furthermore, Master-&gt;CommitUpdates is not called because the exception which is rethrown causes that code to be skipped, so the cache is also left in the state it was before the attempt to update.&lt;br /&gt;&lt;br /&gt;To appreciate the value of the two-phase update process, assume for a moment that ApplyUpdates is a single-phase process which updates the data and the cache. If this were the case, and if there were an error while applying the updates to the Detail table, then there would be no way to restore both the data and the cache to their original states. Even though the call to Database1-&gt;Rollback would restore the database, there would be no way to restore the cache.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1714120810748722141?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1714120810748722141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/applying-updates-for-masterdetail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1714120810748722141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1714120810748722141'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/applying-updates-for-masterdetail.html' title='Applying updates for master/detail tables'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4561703887263969246</id><published>2009-04-27T11:01:00.000+03:00</published><updated>2009-04-27T11:02:58.263+03:00</updated><title type='text'>Limiting records with parameters</title><content type='html'>When the provider on the application server represents the results of a table component, you can use Params property to limit the records that are provided to the Data property.&lt;br /&gt;Each parameter name must match the name of a field in the TTable component on the application server. The provider component on the application server sends only those records whose values on the corresponding fields match the values assigned to the parameters.&lt;br /&gt;&lt;br /&gt;For example, consider a client application that displays the orders for a single customer. When the user identifies the customer, the client dataset sets its Params property to include a single parameter named CustID (or whatever field in the server table is called) whose value identifies the customer whose orders it will display. When the client dataset requests data from the application server, it passes this parameter value. The application server then sends only the records for the identified customer. This is more efficient than letting the application server send all the orders records to the client application and then filtering the records on the client side.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4561703887263969246?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4561703887263969246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/limiting-records-with-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4561703887263969246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4561703887263969246'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/limiting-records-with-parameters.html' title='Limiting records with parameters'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8853306193138158025</id><published>2009-04-27T10:58:00.001+03:00</published><updated>2009-04-27T11:10:14.190+03:00</updated><title type='text'>Master/detail relationships: Two Drawbacks</title><content type='html'>1.The detail table must fetch and store all of its records from the application server even though it only uses one detail set at a time. This problem can be mitigated by using parameters.&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/limiting-records-with-parameters.html"&gt;Limiting records with parameters&lt;/a&gt;&lt;br /&gt;2.It is very difficult to apply updates, because client datasets apply updates at the dataset level and master/detail updates span multiple datasets. Even in a two-tiered environment, where you can use the database to apply updates for multiple tables in a single transaction, applying updates in master/detail forms is tricky.&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/applying-updates-for-masterdetail.html"&gt;Applying updates for master/detail tables&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In multi-tiered applications, you can avoid these problems by using nested tables to represent the master/detail relationship. To do this, set up a master/detail relationship between the tables on the application server. Then set the DataSet property of your provider component to the master table.&lt;br /&gt;When clients call the GetRecords method of the provider, it automatically includes the detail datasets as a DataSet field in the records of the data packet. When clients call the ApplyUpdates method of the provider, it automatically handles applying updates in the proper order&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8853306193138158025?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8853306193138158025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/masterdetail-relationships-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8853306193138158025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8853306193138158025'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/masterdetail-relationships-two.html' title='Master/detail relationships: Two Drawbacks'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4058066684122027044</id><published>2009-04-27T10:53:00.000+03:00</published><updated>2009-04-27T10:54:42.735+03:00</updated><title type='text'>Building an example master/detail form</title><content type='html'>The following steps create a simple form in which a user can scroll through customer records and display all orders for the current customer. The master table is the CustomersTable table, and the detail table is OrdersTable.&lt;br /&gt;&lt;br /&gt;1 Place two TTable and two TDataSource components in a data module.&lt;br /&gt;2 Set the properties of the first TTable component as follows:&lt;br /&gt;&lt;br /&gt;DatabaseName: BCDEMOS&lt;br /&gt; TableName: CUSTOMER&lt;br /&gt; Name: CustomersTable&lt;br /&gt;&lt;br /&gt;3 Set the properties of the second TTable component as follows:&lt;br /&gt;&lt;br /&gt;DatabaseName: BCDEMOS&lt;br /&gt; TableName: ORDERS&lt;br /&gt; Name: OrdersTable&lt;br /&gt;&lt;br /&gt;4 Set the properties of the first TDataSource component as follows:&lt;br /&gt;&lt;br /&gt;Name: CustSource&lt;br /&gt; DataSet: CustomersTable&lt;br /&gt;&lt;br /&gt;5 Set the properties of the second TDataSource component as follows:&lt;br /&gt;&lt;br /&gt;Name: OrdersSource&lt;br /&gt; DataSet: OrdersTable&lt;br /&gt;&lt;br /&gt;6 Place two TDBGrid components on a form. &lt;br /&gt;7 Choose File|Include Unit Hdr to specify that the form should use the data module.&lt;br /&gt;8 Set the DataSource property of the first grid component to &lt;br /&gt;“CustSource”, and set the DataSource property of the second grid to “OrdersSource”.&lt;br /&gt;9 Set the MasterSource property of OrdersTable to “CustSource”. This links the CUSTOMER table (the master table) to the ORDERS table (the detail table).&lt;br /&gt;&lt;br /&gt;10 Double-click the MasterFields property value box in the Object Inspector to invoke the Field Link Designer to set the following properties:&lt;br /&gt;&lt;br /&gt;In the Available Indexes field, choose CustNo to link the two tables by the CustNo field.&lt;br /&gt; Select CustNo in both the Detail Fields and Master Fields field lists.&lt;br /&gt; Click the Add button to add this join condition. In the Joined Fields list,&lt;br /&gt;“CustNo -&gt; CustNo” appears.&lt;br /&gt; Choose OK to commit your selections and exit the Field Link Designer.&lt;br /&gt;&lt;br /&gt;11 Set the Active properties of CustomersTable and OrdersTable to true to display data in the grids on the form.&lt;br /&gt;12 Compile and run the application.&lt;br /&gt;&lt;br /&gt;If you run the application now, you will see that the tables are linked together, and that when you move to a new record in the CUSTOMER table, you see only those records in the ORDERS table that belong to the current customer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4058066684122027044?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4058066684122027044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/building-example-masterdetail-form.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4058066684122027044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4058066684122027044'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/building-example-masterdetail-form.html' title='Building an example master/detail form'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-9191895150591124990</id><published>2009-04-27T10:51:00.002+03:00</published><updated>2009-04-27T10:57:58.462+03:00</updated><title type='text'>Supporting master/detail relationships</title><content type='html'>You can create master/detail relationships between client datasets in your client application in the same way you set up master/detail forms in one- and two-tiered applications.&lt;br /&gt;&lt;strong&gt;Creating master/detail forms&lt;/strong&gt;&lt;br /&gt;A table component’s MasterSource and MasterFields properties can be used to establish one-to-many relationships between two tables.&lt;br /&gt;The MasterSource property is used to specify a data source from which the table will get data for the master table. For instance, if you link two tables in a master/detail relationship, then the detail table can track the events occurring in the master table by specifying the master table’s data source component in this property. &lt;br /&gt;&lt;br /&gt;The MasterFields property specifies the column(s) common to both tables used to establish the link. To link tables based on multiple column names, use a semicolon delimited list:&lt;br /&gt;&lt;br /&gt;Table1-&gt;MasterFields = "OrderNo;ItemNo";&lt;br /&gt;&lt;br /&gt;To help create meaningful links between two tables, you can use the Field Link designer.&lt;br /&gt;example of a master/detail form&lt;a href="http://swifteasyprogramming.blogspot.com/2009/04/building-example-masterdetail-form.html"&gt;Building an Example master/detail form&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-9191895150591124990?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/9191895150591124990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/supporting-masterdetail-relationships.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/9191895150591124990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/9191895150591124990'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/supporting-masterdetail-relationships.html' title='Supporting master/detail relationships'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-333574273824646400</id><published>2009-04-27T10:48:00.001+03:00</published><updated>2009-04-27T10:51:24.761+03:00</updated><title type='text'>Managing transactions in multi-tiered applications</title><content type='html'>When client applications apply updates to the application server, the provider component automatically wraps the process of applying updates and resolving errors in a transaction. This transaction is committed if the number of problem records does not exceed the MaxErrors value specified as an argument to the ApplyUpdates method. Otherwise, it is rolled back.&lt;br /&gt;In addition, you can add transaction support to your server application by adding a database component or using passthrough SQL. This works the same way that you would manage transactions in a two-tiered application.&lt;br /&gt;&lt;br /&gt;If you have a transactional data module, you can broaden your transaction support by using MTS or COM+ transactions. These transactions can include any of the business logic on your application server, not just the database access. In addition, because they support two-phase commits, they can span multiple databases.&lt;br /&gt;Only the BDE- and ADO-based data access components support two-phase commit. Do not use InterbaseExpress components if you want to have transactions that span multiple databases.&lt;br /&gt;Important Note:&lt;br /&gt;When using the BDE, two-phase commit is fully implemented only on Oracle7 and MS-SQL databases. If your transaction involves multiple databases, and some of them are remote servers other than Oracle7 or MS-SQL, your transaction runs a small risk of only partially succeeding. Within any one database, however, you will always have transaction support.&lt;br /&gt;&lt;br /&gt;By default, all IAppServer calls on a transactional data module are transactional. You need only set the transaction attribute of your data module to indicate that it must participate in transactions. In addition, you can extend the application server’s interface to include method calls that encapsulate transactions that you define.&lt;br /&gt;&lt;br /&gt;If your transaction attribute indicates that the application server requires a transaction, then every time a client calls a method on its interface, it is automatically wrapped in a transaction. All client calls to your application server are then enlisted in that transaction until you indicate that the transaction is complete. These calls either succeed as a whole or are rolled back.&lt;br /&gt;&lt;br /&gt;Note:Do not combine MTS or COM+ transactions with explicit transactions created by a database or ADO connection component or using passthrough SQL. When your transactional data module is enlisted in a transaction, it automatically enlists all of your database calls in the transaction as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-333574273824646400?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/333574273824646400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/managing-transactions-in-multi-tiered.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/333574273824646400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/333574273824646400'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/managing-transactions-in-multi-tiered.html' title='Managing transactions in multi-tiered applications'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2736111389684649140</id><published>2009-04-27T10:44:00.002+03:00</published><updated>2009-04-27T10:48:01.579+03:00</updated><title type='text'>Transactions</title><content type='html'>A transaction is a group of actions that must all be carried out successfully on one or more tables in a database before they are committed (made permanent). If any of the actions in the group fails, then all actions are rolled back (undone).&lt;br /&gt;Transactions protect against hardware failures that occur in the middle of a database command or set of commands. They also form the basis of multi-user concurrency control on SQL servers. When each user interacts with the database only through transactions, one user’s commands can’t disrupt the unity of another user’s transaction. Instead, the SQL server schedules incoming transactions, which either succeed as a whole or fail as a whole.&lt;br /&gt;&lt;br /&gt;Although transaction support is not part of most local databases, the BDE drivers provide limited transaction support for some of these databases. For SQL servers and ODBC-compliant databases, the database transaction support is provided by the component that represents the database connection. In multi-tiered applications, you can create transactions that include actions other than database operations or that span multiple databases.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using transactions&lt;/strong&gt;&lt;br /&gt;A transaction is a group of actions that must all be carried out successfully on one or more tables in a database before they are committed (made permanent). If one of the actions in the group fails, then all actions are rolled back (undone). By using transactions, you ensure that the database is not left in an inconsistent state when a problem occurs completing one of the actions that make up the transaction. &lt;br /&gt;For example, in a banking application, transferring funds from one account to another is an operation you would want to protect with a transaction. If, after decrementing the balance in one account, an error occurred incrementing the balance in the other, you want to roll back the transaction so that the database still reflects the correct total balance.&lt;br /&gt;&lt;br /&gt;By default, the BDE provides implicit transaction control for your applications. When an application is under implicit transaction control, a separate transaction is used for each record in a dataset that is written to the underlying database. Implicit transactions guarantee both a minimum of record update conflicts and a consistent view of the database. On the other hand, because each row of data written to a database takes place in its own transaction, implicit transaction control can lead to excessive network traffic and slower application performance. Also, implicit transaction control will not protect logical operations that span more than one record, such as the transfer of funds described previously.&lt;br /&gt;&lt;br /&gt;If you explicitly control transactions, you can choose the most effective times to start, commit, and roll back your transactions. When you develop applications in a multi-user environment, particularly when your applications run against a remote SQL server, you should control transactions explicitly.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Working with (connection) transactions&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The TADOConnection component includes a number of methods and events for working with transactions. These transaction capabilities are shared by all of the ADO command and dataset components using the data store connection&lt;br /&gt;&lt;br /&gt;1.Using transaction methods&lt;br /&gt;Use the methods BeginTrans, CommitTrans, and RollbackTrans to perform transaction processing. BeginTrans starts a transaction in the data store associated with the ADO connection component. CommitTrans commits a currently active transaction, saving changes to the database and ending the transaction. RollbackTrans cancels a currently active transaction, abandoning all changes made during the transaction and ending the transaction. Read the InTransaction property to determine at any given point whether the connection component has a transaction open.&lt;br /&gt;&lt;br /&gt;A transaction started by the connection component is shared by all command and dataset components that use the connection established by the TADOConnection component.&lt;br /&gt;2.Using transaction events&lt;br /&gt;The ADO connection component provides a number of events for detecting when transaction-related processes have been completed. These events indicate when a transaction process initiated by a BeginTrans, CommitTrans, and RollbackTrans method have been successfully completed at the data store.&lt;br /&gt;The OnBeginTransComplete event is triggered when the data store has successfully started a transaction after a call to the connection component’s BeginTrans method. The OnCommitTransComplete event is triggered after a transaction is successfully committed due to a call to CommitTrans. And OnRollbackTransComplete is triggered after a transaction is successfully committed due to a call to RollbackTrans.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2736111389684649140?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2736111389684649140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/transactions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2736111389684649140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2736111389684649140'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/transactions.html' title='Transactions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-9061223092262967954</id><published>2009-04-27T10:43:00.000+03:00</published><updated>2009-04-27T10:44:24.701+03:00</updated><title type='text'>Database security</title><content type='html'>Databases often contain sensitive information. Different databases provide security schemes for protecting that information. Some databases, such as Paradox and dBASE, only provide security at the table or field level. When users try to access protected tables, they are required to provide a password. Once users have been authenticated, they can see only those fields (columns) for which they have permission. &lt;br /&gt;Most SQL servers require a password and user name to use the database server at all. Once the user has logged in to the database, that username and password determine which tables can be used. For information on providing passwords to SQL servers when using the BDE, see Controlling server login. For information on providing this information when using ActiveX Data Objects (ADO), see Controlling the connection login. For information on providing this information when using the InterBase direct access components, see the OnLogin event of TIBDatabase.&lt;br /&gt;&lt;br /&gt;When designing database applications, you must consider what type of authentication is required by your database server. If you do not want your users to have to provide a password, you must either use a database that does not require one or you must provide the password and username to the server programmatically. When providing the password programmatically, care must be taken that security can’t be breached by reading the password from the application.&lt;br /&gt;If you are requiring your user to supply a password, you must consider when the password is required. If you are using a local database but intend to scale up to a larger SQL server later, you may want to prompt for the password before you access the table, even though it is not required until then.&lt;br /&gt;&lt;br /&gt;If your application requires multiple passwords because you must log in to several protected systems or databases, you can have your users provide a single master password which is used to access a table of passwords required by the protected systems. The application then supplies passwords programmatically, without requiring the user to provide multiple passwords.&lt;br /&gt;In multi-tiered applications, you may want to use a different security model altogether. You can use HTTPs or MTS to control access to middle tiers, and let the middle tiers handle all details of logging into database servers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-9061223092262967954?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/9061223092262967954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/database-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/9061223092262967954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/9061223092262967954'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/database-security.html' title='Database security'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2269221194123939450</id><published>2009-04-27T10:37:00.002+03:00</published><updated>2009-04-27T10:43:41.672+03:00</updated><title type='text'>Types of databases</title><content type='html'>You can connect to different types of databases, depending on what drivers you have installed with the Borland Database Engine (BDE) or ActiveX Data Objects (ADO).&lt;br /&gt;These drivers may connect your application to local databases such as Paradox, Access, and dBASE or remote database servers like Microsoft SQL Server, Oracle, and Informix. Similarly, the InterBase Express components can access either a local or remote version of InterBase.&lt;br /&gt;&lt;br /&gt;NB: Different versions of C++Builder come with the components that use these drivers (BDE or ADO), or with the InterBase Express components.&lt;br /&gt;&lt;br /&gt;Choosing what type of database to use depends on several factors. Your data may already be stored in an existing database. If you are creating the tables of information your application uses, you may want to consider the following questions.&lt;br /&gt;&lt;br /&gt;How much data will the tables hold?&lt;br /&gt;How many users will be sharing these tables?&lt;br /&gt;What type of performance (speed) do you require from the database?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Local databases&lt;/strong&gt;&lt;br /&gt;Local databases reside on your local drive or on a local area network. They have proprietary APIs for accessing the data. Often, they are dedicated to a single system. When they are shared by several users, they use file-based locking mechanisms. Because of this, they are sometimes called file-based databases.&lt;br /&gt;Local databases can be faster than remote database servers because they often reside on the same system as the database application.&lt;br /&gt;Because they are file-based, local databases are more limited than remote database servers in the amount of data they can store. Therefore, in deciding whether to use a local database, you must consider how much data the tables are expected to hold.&lt;br /&gt;&lt;br /&gt;Applications that use local databases are called single-tiered applications because the application and the database share a single file system.&lt;br /&gt;Examples of local databases include Paradox, dBASE, FoxPro, and Access.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Remote database servers&lt;/strong&gt;&lt;br /&gt;Remote database servers usually reside on a remote machine. They use Structured Query Language (SQL) to enable clients to access the data. Because of this, they are sometimes called SQL servers. (Another name is Remote Database Management system, or RDBMS.) In addition to the common commands that make up SQL, most remote database servers support a unique “dialect” of SQL.&lt;br /&gt;Remote database servers are designed for access by several users at the same time. Instead of a file-based locking system such as those employed by local databases, they provide more sophisticated multi-user support, based on transactions.&lt;br /&gt;&lt;br /&gt;Remote database servers hold more data than local databases. Sometimes, the data from a remote database server does not even reside on a single machine, but is distributed over several servers.&lt;br /&gt;Applications that use remote database servers are called two-tiered applications or multi-tiered applications because the application and the database operate on independent systems (or tiers).&lt;br /&gt;Examples of SQL servers include InterBase, Oracle, Sybase, Informix, Microsoft SQL server, and DB2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2269221194123939450?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2269221194123939450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/types-of-databases.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2269221194123939450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2269221194123939450'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/types-of-databases.html' title='Types of databases'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-9072463637310572157</id><published>2009-04-27T10:33:00.000+03:00</published><updated>2009-04-27T10:37:36.838+03:00</updated><title type='text'>Designing database applications</title><content type='html'>Database applications allow users to interact with information that is stored in databases. Databases provide structure for the information, and allow it to be shared among different applications. &lt;br /&gt;C++Builder provides support for relational database applications. Relational databases organize information into tables, which contain rows (records) and columns (fields). These tables can be manipulated by simple operations known as the relational calculus.&lt;br /&gt;When designing a database application, you must understand how the data is structured. Based on that structure, you can then design a user interface to display data to the user and allow the user to enter new information or modify existing data.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using databases&lt;/strong&gt;&lt;br /&gt;The components on the Data Access page, the ADO page, or the InterBase page of the Component palette allow your application to read from and write to databases. The components on the Data Access page use the Borland Database Engine (BDE) to access database information which they make available to the data-aware controls in your user interface. The ADOExpress components on the ADO page use ActiveX Data Objects (ADO) to access the database information through OLEDB. The InterBase Express components on the InterBase page access an InterBase database directly.&lt;br /&gt;&lt;br /&gt;Depending on your version of C++Builder, the BDE includes drivers for different types of databases. While all types of databases contain tables which store information, different types support additional features such as&lt;br /&gt;&lt;br /&gt;Database security&lt;br /&gt;Transactions&lt;br /&gt;Data dictionary&lt;br /&gt;Referential integrity, stored procedures, and triggers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-9072463637310572157?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/9072463637310572157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/designing-database-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/9072463637310572157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/9072463637310572157'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/designing-database-applications.html' title='Designing database applications'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7849817370105464536</id><published>2009-04-20T17:15:00.000+03:00</published><updated>2009-04-20T17:17:41.197+03:00</updated><title type='text'>The TPersistent Branch</title><content type='html'>Directly below TObject in the VCL hierarchy is TPersistent. TPersistent adds two very important methods to all classes based on it—SaveToStream and LoadFromStream. These methods supply persistence to objects. &lt;br /&gt;For example, when the form designer needs to create a DFM file (a file used to store information about the components on the form), it loops through its components array and calls SaveToStream for all the components on the form. Each component “knows” how to write its changed properties out to a stream (in this case, a text file). Conversely, when the form designer needs to load the properties for components from the DFM file, it loops through the components array and calls LoadFromStream for each component. Thus, any class derived from TPersistent has the ability to save its state information and restore it on demand.&lt;br /&gt;&lt;br /&gt;The types of classes in this branch include:&lt;br /&gt;&lt;br /&gt;TGraphicsObject, an abstract base class for objects which encapsulate Windows graphics objects: TBrush, TFont, and TPen.&lt;br /&gt;TGraphic, an abstract base class type for objects such as icons, bitmaps, and metafiles that can store and display visual images: TBitmap, TIcon, and TMetafile.&lt;br /&gt;TStrings, a base class for objects that represent a list of strings.&lt;br /&gt;TClipboard, a wrapper for the Windows clipboard, which contains text or graphics that have been cut or copied from an application.&lt;br /&gt;&lt;br /&gt;TCollection, TOwnedCollection, and TCollectionItem, maintained indexed collections of specially defined items.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7849817370105464536?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7849817370105464536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/tpersistent-branch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7849817370105464536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7849817370105464536'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/tpersistent-branch.html' title='The TPersistent Branch'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1737353222296823629</id><published>2009-04-20T17:10:00.000+03:00</published><updated>2009-04-20T17:15:08.573+03:00</updated><title type='text'>The TObject Branch</title><content type='html'>All VCL objects descend from TObject, an abstract class whose methods define fundamental behavior like construction, destruction, and message handling. Much of the powerful capability of VCL objects are established by the methods that TObject introduces. TObject encapsulates the fundamental behavior common to all objects in the VCL, by introducing methods that provide:&lt;br /&gt;&lt;br /&gt;The ability to respond when objects are created or destroyed.&lt;br /&gt; Class type and instance information on an object, and runtime type information (RTTI) about its published properties.&lt;br /&gt; Support for message-handling.&lt;br /&gt;&lt;br /&gt;TObject is the immediate ancestor of many simple classes. Classes that are contained within this branch have one common, important characteristic, they are transitory. What this means, is that these classes do not have a method to save the state that they are in prior to destruction, they are not persistent.&lt;br /&gt;One of the main groups of classes in this branch is the Exception class. This class provides a large set of built-in exception classes for automatically handling divide-by-zero errors, file I/O errors, invalid typecasts, and many other exception conditions.&lt;br /&gt;&lt;br /&gt;Another type of group in the TObject branch are classes that encapsulate data structures, such as:&lt;br /&gt;&lt;br /&gt;TBits, a class that stores an “array” of Boolean values&lt;br /&gt; TList, a linked list class&lt;br /&gt; TStack, a class that maintains a last-in first-out array of pointers&lt;br /&gt; TQueue, a class that maintains a first-in first-out array of pointers&lt;br /&gt;&lt;br /&gt;You can also find wrappers for external objects like TPrinter, which encapsulates the Windows printer interface, and TRegistry, a low-level wrapper for the system registry and functions that operate on the registry.&lt;br /&gt;TStream is good example of another type of class in this branch. TStream is the base class type for stream objects that can read from or write to various kinds of storage media, such as disk files, dynamic memory, and so on.&lt;br /&gt;So you can see, this branch includes many different types of classes that are very useful to you as a developer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1737353222296823629?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1737353222296823629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/tobject-branch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1737353222296823629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1737353222296823629'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/tobject-branch.html' title='The TObject Branch'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2151832723046511860</id><published>2009-04-20T16:58:00.000+03:00</published><updated>2009-04-20T17:00:53.981+03:00</updated><title type='text'>Types of events</title><content type='html'>The kinds of events that can occur can be divided into two main categories: &lt;br /&gt;&lt;br /&gt;User events&lt;br /&gt; System events&lt;br /&gt;&lt;br /&gt;Regardless of how the event was called, C++Builder looks to see if you have assigned any code to handle that event. If you have, then that code is executed; otherwise, nothing is done.&lt;br /&gt;&lt;br /&gt;User events&lt;br /&gt;&lt;br /&gt;User events are actions that are initiated by the user. Examples of user events are OnClick (the user clicked the mouse), OnKeyPress (the user pressed a key on the keyboard), and OnDblClick (the user double-clicked a mouse button). These events are always tied to a user's actions.&lt;br /&gt;&lt;br /&gt;System events&lt;br /&gt;&lt;br /&gt;System events are events that the operating system fires for you. For example, the OnTimer event (the Timer component issues one of these events whenever a predefined interval has elapsed), the OnCreate event (the component is being created), the OnPaint event (a component or window needs to be redrawn), etc. Usually, system events are not directly initiated by a user action.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2151832723046511860?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2151832723046511860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/types-of-events.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2151832723046511860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2151832723046511860'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/types-of-events.html' title='Types of events'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3151788233881723203</id><published>2009-04-20T16:56:00.000+03:00</published><updated>2009-04-20T16:57:29.552+03:00</updated><title type='text'>Understanding the VCL</title><content type='html'>The Visual Component Library (VCL) is based on the properties, methods, and events (PME) model. The PME model defines the data members (properties), the functions that operate on the data (methods), and a way to interact with users of the class (events). The VCL is a hierarchy of objects, written in Object Pascal and tied to the C++Builder IDE, that allows you to develop applications quickly. Using C++Builder’s Component palette and Object Inspector, you can place VCL components on forms and specify their properties without writing code.&lt;br /&gt;&lt;br /&gt;Properties&lt;br /&gt;&lt;br /&gt;Properties are characteristics of components. You can see and change properties at design time and get immediate feedback as the components react in the IDE. Well-designed properties make your components easier for others to use and easier for you to maintain.&lt;br /&gt;&lt;br /&gt;Methods&lt;br /&gt;&lt;br /&gt;Methods are functions that are members of a class. Class methods can access all the public, protected and private properties and data members of the class and are commonly referred to as member functions.&lt;br /&gt;&lt;br /&gt;Events&lt;br /&gt;&lt;br /&gt;Event driven programming (EDP) means just that—programming by responding to events. In essence, event driven means that the program does not restrict what the user can do next. For example, in a Windows program, the programmer has no way of knowing the sequence of actions the user will perform next. They may pick a menu item, click a button, or mark some text. So, EDP means that you write code to handle whatever events occur that you're interested in, rather than write code that always executes in the same restricted order.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3151788233881723203?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3151788233881723203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/understanding-vcl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3151788233881723203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3151788233881723203'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/understanding-vcl.html' title='Understanding the VCL'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-6312443704847108322</id><published>2009-04-20T16:46:00.001+03:00</published><updated>2009-04-20T16:53:01.171+03:00</updated><title type='text'>The integrated development environment</title><content type='html'>When you start C++Builder, you are immediately placed within the integrated development environment, also called the IDE. This environment provides all the tools you need to design, develop, test, debug, and deploy applications. &lt;br /&gt;&lt;br /&gt;C++Builder’s development environment includes a visual form designer, Object Inspector, Component palette, Project Manager, source code editor, debugger, and installation tool. You can move freely from the visual representation of an object (in the form designer), to the Object Inspector to edit the initial runtime state of the object, to the source code editor to edit the execution logic of the object. Changing code-related properties, such as the name of an event handler, in the Object Inspector automatically changes the corresponding source code. In addition, changes to the source code, such as renaming an event handler method in a form class declaration, is immediately reflected in the Object Inspector.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Designing applications&lt;/span&gt;&lt;br /&gt;C++Builder includes all the tools necessary to start designing applications:&lt;br /&gt;&lt;br /&gt;A blank window, known as a form, on which to design the UI for your application.&lt;br /&gt; An extensive class library with many reusable objects.&lt;br /&gt; An Object Inspector for examining and changing object traits.&lt;br /&gt; A Code editor that provides direct access to the underlying program logic.&lt;br /&gt; A Project Manager for managing the files that make up one or more projects.&lt;br /&gt; Many other tools such as an image editor on the toolbar and an integrated debugger on menus to support application development in the IDE.&lt;br /&gt;&lt;br /&gt;Command-line tools including compilers, linkers, and other utilities.&lt;br /&gt;&lt;br /&gt;You can use C++Builder to design any kind of 32-bit Windows application—from general-purpose utilities to sophisticated data access programs or distributed applications. C++Builder’s database tools and data-aware components let you quickly develop powerful desktop database and client/server applications. Using C++Builder’s data-aware controls, you can view live data while you design your application and immediately see the results of database queries and changes to the application interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-6312443704847108322?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/6312443704847108322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/integrated-development-environment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6312443704847108322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/6312443704847108322'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/integrated-development-environment.html' title='The integrated development environment'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4092110313021229348</id><published>2009-04-06T11:19:00.000+03:00</published><updated>2009-04-06T11:20:39.379+03:00</updated><title type='text'>Using the const Keyword in C++ Programs</title><content type='html'>C++ extends const to include classes and member functions. In a C++ class definition, use the const modifier following a member function declaration. The member function is prevented from modifying any data in the class.&lt;br /&gt;&lt;br /&gt;A class object defined with the const keyword attempts to use only member functions that are also defined with const. If you call a member function that is not defined as const, the compiler issues a warning that a non-const function is being called for a const object. Using the const keyword in this manner is a safety feature of C++.&lt;br /&gt;&lt;br /&gt;Warning: A pointer can indirectly modify a const variable, as in the following:&lt;br /&gt;&lt;br /&gt;*(int *)&amp;maxint = 35;&lt;br /&gt;&lt;br /&gt;If you use the const modifier with a pointer parameter in a function's parameter list, the function cannot modify the variable that the pointer points to. For example,&lt;br /&gt;&lt;br /&gt;int printf (const char *format, ...);&lt;br /&gt;&lt;br /&gt;printf is prevented from modifying the format string.&lt;br /&gt;volatile&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;volatile &lt;data definition&gt; ;&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Use the volatile modifier to indicate that a variable can be changed by a background routine, an interrupt routine, or an I/O port. Declaring an object to be volatile warns the compiler not to make assumptions concerning the value of the object while evaluating expressions in which it occurs because the value could change at any moment. It also prevents the compiler from making the variable a register variable&lt;br /&gt;&lt;br /&gt;volatile int ticks;&lt;br /&gt;&lt;br /&gt;void timer( ) {&lt;br /&gt;   ticks++;&lt;br /&gt;}&lt;br /&gt;void wait (int interval) {&lt;br /&gt;   ticks = 0;&lt;br /&gt;   while (ticks &lt; interval);  // Do nothing&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The routines in this example (assuming timer has been properly associated with a hardware clock interrupt) implement a timed wait of ticks specified by the argument interval. A highly optimizing compiler might not load the value of ticks inside the test of the while loop since the loop doesn’t change the value of ticks.&lt;br /&gt;&lt;br /&gt;Note: C++ extends volatile to include classes and member functions. If you’ve declared a volatile object, you can use only its volatile member functions.&lt;br /&gt;&lt;br /&gt;pascal, _pascal, __pascal&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;pascal &lt;data-definition/function-definition&gt; ;&lt;br /&gt;&lt;br /&gt;_pascal &lt;data-definition/function-definition&gt; ;&lt;br /&gt;&lt;br /&gt;__pascal &lt;data-definition/function-definition&gt; ;&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Use the pascal, _pascal, and __pascal keywords to declare a variable or a function using a Pascal-style naming convention (the name is in uppercase).&lt;br /&gt;&lt;br /&gt;In addition, pascal declares Pascal-style parameter-passing conventions when applied to a function header (parameters pushed left to right; the called function cleans up the stack).&lt;br /&gt;&lt;br /&gt;In C++ programs, functions declared with the pascal modifer will still be mangled.&lt;br /&gt;&lt;br /&gt;_stdcall, __stdcall&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;__stdcall &lt;function-name&gt;&lt;br /&gt;&lt;br /&gt;_stdcall &lt;function-name&gt;&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The _stdcall and __stdcall keywords force the compiler to generate function calls using the Standard calling convention. Functions must pass the correct number and type of arguments; this is unlike normal C use, which permits a variable number of function arguments. Such functions comply with the standard WIN32 argument-passing convention.&lt;br /&gt;_fastcall, __fastcall&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;return-value _fastcall function-name(parm-list)&lt;br /&gt;&lt;br /&gt;return-value __fastcall function-name(parm-list)&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Use the __fastcall modifier to declare functions that expect parameters to be passed in registers. The first three parameters are passed (from left to right) in EAX, EDX, and ECX, if they fit in the register. The registers are not used if the parameter is a floating-point or struct type.&lt;br /&gt;&lt;br /&gt;The compiler treats this calling convention as a new language specifier, along the lines of _cdecl and _pascal&lt;br /&gt;&lt;br /&gt;Functions declared using _cdecl or _pascal cannot also have the _fastcall modifiers because they use the stack to pass parameters.&lt;br /&gt;&lt;br /&gt;The compiler prefixes the __fastcall function name with an at-sign ("@"). This prefix applies to both unmangled C function names and to mangled C++ function names.&lt;br /&gt;__thread, multithread variables&lt;br /&gt;Category&lt;br /&gt;&lt;br /&gt;C++Builder keyword extensions&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The keyword __thread is used in multithread programs to preserve a unique copy of global and static class variables. Each program thread maintains a private copy of a __thread variable for each thread.&lt;br /&gt;&lt;br /&gt;The syntax is Type __thread variable__name. For example&lt;br /&gt;&lt;br /&gt; int __thread x;&lt;br /&gt;&lt;br /&gt;declares an integer type variable that will be global but private to each thread in the program in which the statement occurs.&lt;br /&gt;&lt;br /&gt;Function modifiers&lt;br /&gt;This section presents descriptions of the C++Builder function modifiers&lt;br /&gt;&lt;br /&gt;You can use the __declspec(dllexport), and __declspec(dllimport) modifiers to modify functions.&lt;br /&gt;&lt;br /&gt;In 32-bit programs the keyword can be applied to class, function, and variable declarations&lt;br /&gt;&lt;br /&gt;The __declspec(dllexport) modifier makes the function exportable from Windows. The __declspec(dllimport) modifier makes a function available to a Windows program. The keywords are used in an executable (if you don't use smart callbacks) or in a DLL.&lt;br /&gt;&lt;br /&gt;Functions declared with the __fastcall modifier have different names than their non-__fastcall counterparts. The compiler prefixes the __fastcall function name with an @. This prefix applies to both unmangled C function names and to mangled C++ function names.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4092110313021229348?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4092110313021229348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-const-keyword-in-c-programs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4092110313021229348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4092110313021229348'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/using-const-keyword-in-c-programs.html' title='Using the const Keyword in C++ Programs'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3748986016239973196</id><published>2009-04-06T11:14:00.000+03:00</published><updated>2009-04-06T11:15:29.831+03:00</updated><title type='text'>C++Builder modifiers</title><content type='html'>Modifier    Use with    Description&lt;br /&gt;&lt;br /&gt;const1   Variables   Prevents changes to object.&lt;br /&gt;volatile1   Variables   Prevents register allocation and some optimization.         Warns compiler that object might be subject to                        outside change during evaluation.&lt;br /&gt;__cdecl2   Functions   Forces C argument-passing convention. Affects          linker and link-time names.&lt;br /&gt;__cdecl2   Variables   Forces global identifier case-sensitivity and leading         underscores in C.&lt;br /&gt;__pascal   Function   Forces Pascal argument-passing convention.          Affects linker and link- time names.&lt;br /&gt;&lt;br /&gt;__pascal     Variables     Forces global identifier case-insensitivity           with no leading underscores in C.&lt;br /&gt;__import   Functions/classes    Tells the compiler which functions or                  classes to import.&lt;br /&gt;__export   Functions/classes      Tells the compiler which functions or classes          to export.&lt;br /&gt;__declspec(dllimport) Functions/classes       Tells the compiler which functions or classes to          import. This is the preferred method.&lt;br /&gt;__declspec(dllexport) Functions/classes       Tells the compiler which functions or classes to              export. This is the preferred method.&lt;br /&gt;&lt;br /&gt;__fastcall Functions Forces register parameter passing convention. Affects the linker and link-time names.&lt;br /&gt;__stdcall Function Forces the standard WIN32 argument-passing convention.&lt;br /&gt;&lt;br /&gt;1. C++ extends const and volatile to include classes and member functions.&lt;br /&gt;2. This is the default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3748986016239973196?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3748986016239973196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/cbuilder-modifiers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3748986016239973196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3748986016239973196'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/cbuilder-modifiers.html' title='C++Builder modifiers'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7155489532755481835</id><published>2009-04-06T11:07:00.000+03:00</published><updated>2009-04-06T11:13:03.620+03:00</updated><title type='text'>Variable modifiers Mixed-language calling conventions</title><content type='html'>C++Builder allows your programs to easily call routines written in other languages, and vice versa. When you mix languages , you have to deal with two important issues: identifiers and parameter passing.&lt;br /&gt;&lt;br /&gt;By default, C++Builder saves all global identifiers in their original case (lower, upper, or mixed) with an underscore "_" prepended to the front of the identifier. To remove the default, you can use the -u command-line option.&lt;br /&gt;&lt;br /&gt;he following table summarizes the effects of a modifier applied to a called function. For every modifier, the table shows the order in which the function parameters are pushed on the stack. Next, the table shows whether the calling program (the caller) or the called function (the callee) is responsible for popping the parameters off the stack. Finally, the table shows the effect on the name of a global function.&lt;br /&gt;&lt;br /&gt;Calling conventions&lt;br /&gt;&lt;br /&gt;Modifier Push parameters    Pop parameters  Name change (only in C)&lt;br /&gt;&lt;br /&gt;__cdecl1 Right to left    Caller    '_' prepended&lt;br /&gt;__fastcall Left to right    Callee    '@' prepended&lt;br /&gt;__pascal Left to right    Callee       Uppercase&lt;br /&gt;__stdcall Right to left    Callee      No change&lt;br /&gt;&lt;br /&gt;1. This is the default.&lt;br /&gt;&lt;br /&gt;Note: __fastcall and __stdcall are always name mangled in C++.&lt;br /&gt;&lt;br /&gt;const&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;const ‘variable name’ [ = ‘value’ ] ;&lt;br /&gt;&lt;br /&gt;‘function name’ ( const ‘type’*’variable name’ ;)&lt;br /&gt;&lt;br /&gt;‘function name’ const;&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Use the const modifier to make a variable value unmodifiable.&lt;br /&gt;&lt;br /&gt;Use the const modifier to assign an initial value to a variable that cannot be changed by the program. Any future assignments to a const result in a compiler error.&lt;br /&gt;&lt;br /&gt;A const pointer cannot be modified, though the object to which it points can be changed. Consider the following examples.&lt;br /&gt;&lt;br /&gt;   const float pi   = 3.14;&lt;br /&gt;&lt;br /&gt;   const  maxint  = 12345;   // When used by itself, const is equivalent to int.&lt;br /&gt;   char *const str1 = "Hello, world";           // A constant pointer&lt;br /&gt;&lt;br /&gt;   char const *str2 = "Borland International";  // A pointer to a constant character string.&lt;br /&gt;&lt;br /&gt;Given these declarations, the following statements are illegal.&lt;br /&gt;&lt;br /&gt;pi   = 3.0;         // Assigns a value to a const.&lt;br /&gt;&lt;br /&gt;i     = maxint++;   // Increments a const.&lt;br /&gt;&lt;br /&gt;str1 = "Hi, there!" // Points str1 to something else.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7155489532755481835?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7155489532755481835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/variable-modifiers-mixed-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7155489532755481835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7155489532755481835'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/variable-modifiers-mixed-language.html' title='Variable modifiers Mixed-language calling conventions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2828015248406937487</id><published>2009-04-06T10:45:00.001+03:00</published><updated>2009-04-06T10:50:21.807+03:00</updated><title type='text'>Declarations and declarators</title><content type='html'>A declaration is a list of names. The names are sometimes referred to as declarators or identifiers. The declaration begins with optional storage class specifiers, type specifiers, and other modifiers. The identifiers are separated by commas and the list is terminated by a semicolon.&lt;br /&gt;&lt;br /&gt;Simple declarations of variable identifiers have the following pattern:&lt;br /&gt;&lt;br /&gt;data-type var1” &lt;=init1&gt;, var2 &lt;=init2&gt;, ...;”&lt;br /&gt;&lt;br /&gt;where var1, var2,... are any sequence of distinct identifiers with optional initializers. Each of the variables is declared to be of type data-type. For example,&lt;br /&gt;&lt;br /&gt;int x = 1, y = 2;&lt;br /&gt;&lt;br /&gt;creates two integer variables called x and y (and initializes them to the values 1 and 2, respectively).&lt;br /&gt;&lt;br /&gt;These are all defining declarations; storage is allocated and any optional initializers are applied.&lt;br /&gt;&lt;br /&gt;The initializer for an automatic object can be any legal expression that evaluates to an assignment-compatible value for the type of the variable involved. Initializers for static objects must be constants or constant expressions.&lt;br /&gt;&lt;br /&gt;In C++, an initializer for a static object can be any expression involving constants and previously declared variables and functions&lt;br /&gt;&lt;br /&gt;The format of the declarator indicates how the declared name is to be interpreted when used in an expression. If type is any type, and storage class specifier is any storage class specifier, and if D1 and D2 are any two declarators, then the declaration&lt;br /&gt;&lt;br /&gt;storage-class-specifier type D1, D2;&lt;br /&gt;&lt;br /&gt;indicates that each occurrence of D1 or D2 in an expression will be treated as an object of type type and storage class storage class specifier. The type of the name embedded in the declarator will be some phrase containing type, such as "type&lt;br /&gt;," "pointer to type," "array of type," "function returning type," or "pointer to function returning type," and so on.&lt;br /&gt;&lt;br /&gt;For example, in Declaration syntax examples each of the declarators could be used as rvalues (or possibly lvalues in some cases) in expressions where a single int object would be appropriate. The types of the embedded identifiers are derived from their declarators as follows&lt;br /&gt;&lt;br /&gt;Declaration syntax examples    &lt;br /&gt;&lt;br /&gt;Declarator syntax Implied type of name Example&lt;br /&gt;&lt;br /&gt;type name; type int count;&lt;br /&gt;type name[]; (open) array of type   int count[];&lt;br /&gt;type name[3]; Fixed array of three elements,  int count[3];&lt;br /&gt;all of type (name[0], name[1], and name[2]&lt;br /&gt;type *name; Pointer to type     int *count;&lt;br /&gt;type *name[]; (open) array of pointers to type int *count[];&lt;br /&gt;type *(name[]); Same as above                            int *(count[]);&lt;br /&gt;&lt;br /&gt;type (*name)[]; Pointer to an (open) array of type int (*count) [];&lt;br /&gt;type &amp;name; Reference to type (C++ only)            int &amp;count;&lt;br /&gt;type name(); Function returning type                     int count();&lt;br /&gt;type *name(); Function returning pointer to type int *count();&lt;br /&gt;type *(name()); Same as above                            int *(count());&lt;br /&gt;type (*name)(); Pointer to function returning type int (*count) ();&lt;br /&gt;Storage class specifiers&lt;br /&gt;Storage classes specifiers are also called type specifiers. They dictate the location (data segment, register, heap, or stack) of an object and its duration or lifetime (the entire running time of the program, or during execution of some blocks of code). Storage class can be established by the declaration syntax, by its placement in the source code, or by both of these factors.&lt;br /&gt;The keyword mutable does not affect the lifetime of the class member to which it is applied.&lt;br /&gt;&lt;br /&gt;The storage class specifiers in C++Builder are:&lt;br /&gt;&lt;br /&gt;auto   register&lt;br /&gt;__declspec  static&lt;br /&gt;extern   typedef&lt;br /&gt;mutable&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2828015248406937487?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2828015248406937487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/declarations-and-declarators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2828015248406937487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2828015248406937487'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/declarations-and-declarators.html' title='Declarations and declarators'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-4883787995494447400</id><published>2009-04-06T10:40:00.000+03:00</published><updated>2009-04-06T10:42:06.071+03:00</updated><title type='text'>Arrays, structures, and unions</title><content type='html'>You initialize arrays and structures (at declaration time, if you like) with a brace-enclosed list of initializers for the members or elements of the object in question. The initializers are given in increasing array subscript or member order. You initialize unions with a brace-enclosed initializer for the first member of the union. For example, you could declare an array days, which counts how many times each day of the week appears in a month (assuming that each day will appear at least once), as follows:&lt;br /&gt;&lt;br /&gt;int days[7] = { 1, 1, 1, 1, 1, 1, 1 }&lt;br /&gt;&lt;br /&gt;The following rules initialize character arrays and wide character arrays:&lt;br /&gt;&lt;br /&gt;  You can initialize arrays of character type with a literal string, optionally enclosed in braces. Each character in the string, including the null terminator, initializes successive elements in the array. For example, you could declare&lt;br /&gt;&lt;br /&gt;char name[] = { "Unknown" };&lt;br /&gt;&lt;br /&gt;which sets up an eight-element array, whose elements are 'U' (for name[0]), 'n' (for name[1]), and so on (and including a null terminator).&lt;br /&gt;&lt;br /&gt;  You can initialize a wide character array (one that is compatible with wchar_t) by using a wide string literal, optionally enclosed in braces. As with character arrays, the codes of the wide string literal initialize successive elements of the array.&lt;br /&gt;&lt;br /&gt;Here is an example of a structure initialization:&lt;br /&gt;&lt;br /&gt;struct mystruct {&lt;br /&gt;&lt;br /&gt;   int i;&lt;br /&gt;   char str[21];&lt;br /&gt;   double d;&lt;br /&gt;&lt;br /&gt;   } s = { 20, "Borland", 3.141 };&lt;br /&gt;&lt;br /&gt;Complex members of a structure, such as arrays or structures, can be initialized with suitable expressions inside nested braces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-4883787995494447400?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/4883787995494447400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/arrays-structures-and-unions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4883787995494447400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/4883787995494447400'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/arrays-structures-and-unions.html' title='Arrays, structures, and unions'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-677612501067144223</id><published>2009-04-06T10:38:00.000+03:00</published><updated>2009-04-06T10:40:20.509+03:00</updated><title type='text'>Initializers</title><content type='html'>Initializers set the initial value that is stored in an object (variables, arrays, structures, and so on). If you don't initialize an object, and it has static duration, it will be initialized by default in the following manner:&lt;br /&gt;&lt;br /&gt;  To zero if it is an arithmetic type&lt;br /&gt;  To null if it is a pointer type&lt;br /&gt;&lt;br /&gt;Note: If the object has automatic storage duration, its value is indeterminate.&lt;br /&gt;&lt;br /&gt;Syntax for initializers&lt;br /&gt;&lt;br /&gt;initializer&lt;br /&gt; = expression&lt;br /&gt; = {initializer-list} &lt;,&gt;}&lt;br /&gt; (expression list)&lt;br /&gt;initializer-list&lt;br /&gt; expression&lt;br /&gt; initializer-list, expression&lt;br /&gt; {initializer-list} &lt;,&gt;}&lt;br /&gt;&lt;br /&gt;Rules governing initializers&lt;br /&gt;&lt;br /&gt;  The number of initializers in the initializer list cannot be larger than the number of objects to be initialized.&lt;br /&gt;  The item to be initialized must be an object (for example, an array).&lt;br /&gt;  For C (not required for C++), all expressions must be constants if they appear in one of these places:&lt;br /&gt;&lt;br /&gt;  In an initializer for an object that has static duration.&lt;br /&gt;  In an initializer list for an array, structure, or union (expressions using sizeof are also allowed).&lt;br /&gt;&lt;br /&gt;  If a declaration for an identifier has block scope, and the identifier has external or internal linkage, the declaration cannot have an initializer for the identifier.&lt;br /&gt;  If a brace-enclosed list has fewer initializers than members of a structure, the remainder of the structure is initialized implicitly in the same way as objects with static storage duration.&lt;br /&gt;&lt;br /&gt;Scalar types are initialized with a single expression, which can optionally be enclosed in braces. The initial value of the object is that of the expression; the same constraints for type and conversions apply as for simple assignments.&lt;br /&gt;&lt;br /&gt;For unions, a brace-enclosed initializer initializes the member that first appears in the union's declaration list. For structures or unions with automatic storage duration, the initializer must be one of the following:&lt;br /&gt;&lt;br /&gt;  An initializer list (as described in Arrays, structures, and unions).&lt;br /&gt;  A single expression with compatible union or structure type. In this case, the initial value of the object is that of the expression.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-677612501067144223?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/677612501067144223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/initializers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/677612501067144223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/677612501067144223'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/initializers.html' title='Initializers'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8808311086456264645</id><published>2009-04-06T10:35:00.000+03:00</published><updated>2009-04-06T10:38:05.168+03:00</updated><title type='text'>The Fundamental Types</title><content type='html'>The fundamental type specifiers are built from the following keywords:&lt;br /&gt;&lt;br /&gt;char       __int8 long&lt;br /&gt;double __int16 signed&lt;br /&gt;float  __int32 short&lt;br /&gt;int  __int64 unsigned&lt;br /&gt;&lt;br /&gt;From these keywords you can build the integral and floating-point types, which are together known as the arithmetic types. The modifiers long, short, signed, and unsigned can be applied to the integral types. The include file limits.h contains definitions of the value ranges for all the fundamental types.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Integral types&lt;br /&gt;&lt;br /&gt;char, short, int, and long, together with their unsigned variants, are all considered integral data types. Integral types shows the integral type specifiers, with synonyms listed on the same line.&lt;br /&gt;&lt;br /&gt;Integral types&lt;br /&gt;&lt;br /&gt;char, signed char           Synonyms if default char set to signed.&lt;br /&gt;unsigned char&lt;br /&gt;char, unsigned char Synonyms if default char set to unsigned.&lt;br /&gt;signed char&lt;br /&gt;int, signed int&lt;br /&gt;unsigned, unsigned int&lt;br /&gt;short, short int, signed short int&lt;br /&gt;unsigned short, unsigned short int&lt;br /&gt;long, long int, signed long int&lt;br /&gt;unsigned long, unsigned long int&lt;br /&gt;&lt;br /&gt;Note: These synonyms are not valid in C++. See The three char types.&lt;br /&gt;&lt;br /&gt;signed or unsigned can only be used with char, short, int, or long. The keywords signed and unsigned, when used on their own, mean signed int and unsigned int, respectively.&lt;br /&gt;&lt;br /&gt;In the absence of unsigned, signed is assumed for integral types. An exception arises with char.  C++Builder lets you set the default for char to be signed or unsigned. (The default, if you don't set it yourself, is signed.) If the default is set to unsigned, then the declaration char ch declares ch as unsigned. You would need to use signed char ch to override the default. Similarly, with a signed default for char, you would need an explicit unsigned char ch to declare an unsigned char.&lt;br /&gt;&lt;br /&gt;Only long or short can be used with int. The keywords long and short used on their own mean long int and short int.&lt;br /&gt;&lt;br /&gt;ANSI C does not dictate the sizes or internal representations of these types, except to indicate that short, int, and long form a nondecreasing sequence with "short &lt;= int &lt;= long." All three types can legally be the same. This is important if you want to write portable code aimed at other platforms.&lt;br /&gt;&lt;br /&gt;In a C++Builder 32-bit program, the types int and long are equivalent, both being 32 bits. The signed varieties are all stored in two's complement format using the most significant bit (MSB) as a sign bit: 0 for positive, 1 for negative (which explains the ranges shown in 32-bit data types, sizes, and ranges). In the unsigned versions, all bits are used to give a range of 0 - (2n - 1), where n is 8, 16, or 32.&lt;br /&gt;&lt;br /&gt;Floating-point types&lt;br /&gt;&lt;br /&gt;The representations and sets of values for the floating-point types are implementation dependent; that is, each implementation of C is free to define them. C++Builder uses the IEEE floating-point formats.See the topic on ANSI implementation-specific.&lt;br /&gt;&lt;br /&gt;float and double are 32- and 64-bit floating-point data types, respectively. long can be used with double to declare an 80-bit precision floating-point identifier: long double test_case, for example.&lt;br /&gt;&lt;br /&gt;The table of 32-bit data types, sizes, and ranges indicates the storage allocations for the floating-point types&lt;br /&gt;&lt;br /&gt;Standard arithmetic conversions&lt;br /&gt;&lt;br /&gt;When you use an arithmetic expression, such as a + b, where a and b are different arithmetic types, C++Builder performs certain internal conversions before the expression is evaluated. These standard conversions include promotions of "lower" types to "higher" types in the interests of accuracy and consistency.&lt;br /&gt;&lt;br /&gt;Here are the steps C++Builder uses to convert the operands in an arithmetic expression:&lt;br /&gt;&lt;br /&gt;1. Any small integral types are converted as shown in Methods used in standard arithmetic conversions. After this, any two values associated with an operator are either int (including the long and unsigned modifiers), or they are of type double, float, or long double.&lt;br /&gt;2. If either operand is of type long double, the other operand is converted to long double.&lt;br /&gt;3. Otherwise, if either operand is of type double, the other operand is converted to double.&lt;br /&gt;&lt;br /&gt;4. Otherwise, if either operand is of type float, the other operand is converted to float.&lt;br /&gt;5. Otherwise, if either operand is of type unsigned long, the other operand is converted to unsigned long.&lt;br /&gt;6. Otherwise, if either operand is of type long, then the other operand is converted to long.&lt;br /&gt;7. Otherwise, if either operand is of type unsigned, then the other operand is converted to unsigned.&lt;br /&gt;8. Otherwise, both operands are of type int.&lt;br /&gt;&lt;br /&gt;The result of the expression is the same type as that of the two operands.&lt;br /&gt;&lt;br /&gt;Methods used in standard arithmetic conversions&lt;br /&gt;&lt;br /&gt;Type             Converts to         Method&lt;br /&gt;&lt;br /&gt;char   int         Zero or sign-extended (depends on default char type)&lt;br /&gt;unsigned char int                Zero-filled high byte (always)&lt;br /&gt;signed char           int       Sign-extended (always)&lt;br /&gt;short   int       Same value; sign extended&lt;br /&gt;unsigned short unsigned int      Same value; zero filled&lt;br /&gt;enum   int                Same value&lt;br /&gt;&lt;br /&gt;Special char, int, and enum conversions&lt;br /&gt;&lt;br /&gt;Note: The conversions discussed in this section are specific to C++Builder.&lt;br /&gt;&lt;br /&gt;Assigning a signed character object (such as a variable) to an integral object results in automatic sign extension. Objects of type signed char always use sign extension; objects of type unsigned char always set the high byte to zero when converted to int.&lt;br /&gt;&lt;br /&gt;Converting a longer integral type to a shorter type truncates the higher order bits and leaves low-order bits unchanged. Converting a shorter integral type to a longer type either sign-extends or zero-fills the extra bits of the new value, depending on whether the shorter type is signed or unsigned, respectively.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8808311086456264645?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8808311086456264645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/fundamental-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8808311086456264645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8808311086456264645'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/fundamental-types.html' title='The Fundamental Types'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-742959435289737763</id><published>2009-04-06T10:24:00.002+03:00</published><updated>2009-04-06T10:35:01.520+03:00</updated><title type='text'>Type categories</title><content type='html'>The four basic type categories (and their subcategories) are as follows:&lt;br /&gt;&lt;br /&gt;	Aggregate&lt;br /&gt;&lt;br /&gt;	Array&lt;br /&gt;	struct&lt;br /&gt;	union&lt;br /&gt;	class (C++ only)&lt;br /&gt;&lt;br /&gt;	Function&lt;br /&gt;	Scalar&lt;br /&gt;&lt;br /&gt;	Arithmetic&lt;br /&gt;	Enumeration&lt;br /&gt;	Pointer&lt;br /&gt;	Reference (C++ only)&lt;br /&gt;&lt;br /&gt;	void&lt;br /&gt;&lt;br /&gt;Types can also be viewed in another way: they can be fundamental or derived types. The fundamental types are void, char, int, float, and double, together with short, long, signed, and unsigned variants of some of these. The derived types include pointers and references to other types, arrays of other types, function types, class types, structures, and unions.&lt;br /&gt;&lt;br /&gt;A class object, for example, can hold a number of objects of different types together with functions for manipulating these objects, plus a mechanism to control access and inheritance from other classes&lt;br /&gt;&lt;br /&gt;Given any nonvoid type type (with some provisos), you can declare derived types as follows&lt;br /&gt;Declaring types&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Declaration                                                                  Description&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; t;                                  	                                                 	An object of type &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt;  array[10];                   	           		   	Ten &lt;span style="font-weight: bold;"&gt;types&lt;/span&gt;: array[0] - array[9]&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt;  *ptr;                                        					ptr is a pointer to &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; &amp;amp;ref = t;                             				ref is a reference to&lt;span style="font-weight: bold;"&gt; type&lt;/span&gt; (C++)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; func(void);                         				func returns value of type &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;void&lt;/span&gt; func1(&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; t);                     			func1 takes a type &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; parameter&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;struct&lt;/span&gt; st {&lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; t1;&lt;span style="font-weight: bold;"&gt; type&lt;/span&gt; t2};       		structure &lt;span style="font-weight: bold;"&gt;st&lt;/span&gt; holds two types&lt;br /&gt;&lt;br /&gt;Note:	type&amp;amp; var, type &amp;amp;var, and type &amp;amp; var are all equivalent.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Void&lt;/span&gt;&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;void identifier&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;void is a special type indicating the absence of any value. Use the void keyword as a function return type if the function does not return a value.&lt;br /&gt;&lt;br /&gt;void hello(char *name)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt; printf("Hello, %s.",name);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Use void as a function heading if the function does not take any parameters.&lt;br /&gt;&lt;br /&gt;int init(void)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt; return 1;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Chh%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Times New Roman CYR"; 	panose-1:2 2 6 3 5 4 5 2 3 4; 	mso-font-charset:204; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:536902279 -2147483648 8 0 511 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:56.7pt 42.5pt 56.7pt 85.05pt; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;Times New Roman CYR&amp;quot;;" lang="EN-US"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;Times New Roman CYR&amp;quot;;" lang="EN-US"&gt;&lt;span style=""&gt;  &lt;/span&gt;return 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;Times New Roman CYR&amp;quot;;" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;Times New Roman CYR&amp;quot;;" lang="EN-US"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;Times New Roman CYR&amp;quot;;" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Void Pointers&lt;br /&gt;&lt;br /&gt;Generic pointers can also be declared as void, meaning that they can point to any type.&lt;br /&gt;&lt;br /&gt;void pointers cannot be dereferenced without explicit casting because the compiler cannot determine the size of the pointer object.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-742959435289737763?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/742959435289737763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/type-categories.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/742959435289737763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/742959435289737763'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/type-categories.html' title='Type categories'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1416183779159773770</id><published>2009-04-01T17:42:00.006+03:00</published><updated>2009-04-01T17:51:48.652+03:00</updated><title type='text'>Type Specifiers</title><content type='html'>The type determines how much memory is allocated to an object and how the program interprets the bit patterns found in the object's storage allocation. A data type is the set of values (often implementation-dependent) identifiers can assume, together with the set of operations allowed on those values.&lt;br /&gt;&lt;br /&gt;The type specifier with one or more optional modifiers is used to specify the type of the declared identifier:&lt;br /&gt;&lt;br /&gt;int i;                   // declare i as an integer&lt;br /&gt;&lt;br /&gt;unsigned char ch1, ch2;  // declare two unsigned chars&lt;br /&gt;&lt;br /&gt;By long-standing tradition, if the type specifier is omitted, type signed int (or equivalently, int) is the assumed default. However, in C++, a missing type specifier can lead to syntactic ambiguity, so C++ practice requires you to explicitly declare all int type specifiers.&lt;br /&gt;&lt;br /&gt;The type specifier keywords in C++Builder are:&lt;br /&gt;char,   float ,  signed, wchar_t,&lt;br /&gt;class,   int,     struct,&lt;br /&gt;double,  long,    union,&lt;br /&gt;enum,  short,    unsigned,&lt;br /&gt;&lt;br /&gt;Use the sizeof operators to find the size in bytes of any predefined or user-defined type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1416183779159773770?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1416183779159773770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/type-specifiers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1416183779159773770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1416183779159773770'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/type-specifiers.html' title='Type Specifiers'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1474612163838304113</id><published>2009-04-01T17:40:00.000+03:00</published><updated>2009-04-01T17:41:44.544+03:00</updated><title type='text'>Introduction to declaration syntax</title><content type='html'>All six interrelated attributes (storage classes, types, scope, visibility, duration, and linkage) are determined in diverse ways by declarations.&lt;br /&gt;&lt;br /&gt;Declarations can be defining declarations (also known as definitions) or referencing declarations (sometimes known as nondefining declarations). A defining declaration, as the name implies, performs both the duties of declaring and defining; the nondefining declarations require a definition to be added somewhere in the program. A referencing declaration introduces one or more identifier names into a program. A definition actually allocates memory to an object and associates an identifier with that object.&lt;br /&gt;Tentative definitions&lt;br /&gt;The ANSI C standard supports the concept of the tentative definition. Any external data declaration that has no storage class specifier and no initializer is considered a tentative definition. If the identifier declared appears in a later definition, then the tentative definition is treated as if the extern storage class specifier were present. In other words, the tentative definition becomes a simple referencing declaration.&lt;br /&gt;&lt;br /&gt;If the end of the translation unit is reached and no definition has appeared with an initializer for the identifier, then the tentative definition becomes a full definition, and the object defined has uninitialized (zero-filled) space reserved for it. For example,&lt;br /&gt;&lt;br /&gt;int x;&lt;br /&gt;&lt;br /&gt;int x;           /*legal, one copy of x is reserved */&lt;br /&gt;int y;&lt;br /&gt;int y = 4;       /* legal, y is initialized to 4 */&lt;br /&gt;int z = 5;&lt;br /&gt;&lt;br /&gt;int z = 6;       /* not legal, both are initialized definitions */&lt;br /&gt;&lt;br /&gt;Unlike ANSI C, C++ doesn't have the concept of a tentative declaration; an external data declaration without a storage class specifier is always a definition.&lt;br /&gt;Possible declarations&lt;br /&gt;The range of objects that can be declared includes&lt;br /&gt;&lt;br /&gt;  Variables&lt;br /&gt;  Functions&lt;br /&gt;  Classes and class members (C++)&lt;br /&gt;  Types&lt;br /&gt;  Structure, union, and enumeration tags&lt;br /&gt;  Structure members&lt;br /&gt;  Union members&lt;br /&gt;  Arrays of other types&lt;br /&gt;  Enumeration constants&lt;br /&gt;  Statement labels&lt;br /&gt;  Preprocessor macros&lt;br /&gt;&lt;br /&gt;The full syntax for declarations is shown in Tables 2.1 through 2.3. The recursive nature of the declarator syntax allows complex declarators. You'll probably want to use typedefs to improve legibility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1474612163838304113?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1474612163838304113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/introduction-to-declaration-syntax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1474612163838304113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1474612163838304113'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/04/introduction-to-declaration-syntax.html' title='Introduction to declaration syntax'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-7833611842290444015</id><published>2009-03-24T16:44:00.000+03:00</published><updated>2009-03-24T16:46:02.328+03:00</updated><title type='text'>Translation units &amp; Linkage</title><content type='html'>Translation units&lt;br /&gt;The term translation unit refers to a source code file together with any included files, but less any source lines omitted by conditional preprocessor directives. Syntactically, a translation unit is defined as a sequence of external declarations:&lt;br /&gt;&lt;br /&gt;translation-unit:&lt;br /&gt;&lt;br /&gt;external-declaration&lt;br /&gt; translation-unit external-declaration&lt;br /&gt;external-declaration&lt;br /&gt; function-definition&lt;br /&gt;&lt;br /&gt;declaration&lt;br /&gt;&lt;br /&gt;word external has several connotations in C; here it refers to declarations made outside of any function, and which therefore have file scope. (External linkage is a distinct property; see the section&lt;br /&gt;Any declaration that also reserves storage for an object or function is called a definition (or defining declaration).&lt;br /&gt;Linkage&lt;br /&gt;An executable program is usually created by compiling several independent translation units, then linking the resulting object files with preexisting libraries. A problem arises when the same identifier is declared in different scopes (for example, in different files), or declared more than once in the same scope. Linkage is the process that allows each instance of an identifier to be associated correctly with one particular object or function. All identifiers have one of three linkage attributes, closely related to their scope: external linkage, internal linkage, or no linkage. These attributes are determined by the placement and format of your declarations, together with the explicit (or implicit by default) use of the storage class specifier static or extern.&lt;br /&gt;&lt;br /&gt;Each instance of a particular identifier with external linkage represents the same object or function throughout the entire set of files and libraries making up the program. Each instance of a particular identifier with internal linkage represents the same object or function within one file only. Identifiers with no linkage represent unique entities.&lt;br /&gt;&lt;br /&gt;External and internal linkage rules&lt;br /&gt;&lt;br /&gt;  Any object or file identifier having file scope will have internal linkage if its declaration contains the storage class specifier static.&lt;br /&gt; For C++, if the same identifier appears with both internal and external linkage within the same file, the identifier will have external linkage. In C, it will have internal linkage.&lt;br /&gt;  If the declaration of an object or function identifier contains the storage class specifier extern&lt;br /&gt;, the identifier has the same linkage as any visible declaration of the identifier with file scope. If there is no such visible declaration, the identifier has external linkage.&lt;br /&gt;&lt;br /&gt;  If a function is declared without a storage class specifier, its linkage is determined as if the storage class specifier extern had been used.&lt;br /&gt;  If an object identifier with file scope is declared without a storage class specifier, the identifier has external linkage.&lt;br /&gt;&lt;br /&gt;Identifiers with no linkage attribute:&lt;br /&gt;&lt;br /&gt;  Any identifier declared to be other than an object or a function (for example, a typedef identifier)&lt;br /&gt;  Function parameters&lt;br /&gt;  Block scope identifiers for objects declared without the storage class specifier extern&lt;br /&gt;&lt;br /&gt;Name mangling&lt;br /&gt;&lt;br /&gt;When a C++ module is compiled, the compiler generates function names that include an encoding of the function's argument types. This is known as name mangling. It makes overloaded functions possible, and helps the linker catch errors in calls to functions in other modules. However, there are times when you won't want name mangling. When compiling a C++ module to be linked with a module that does not have mangled names, the C++ compiler has to be told not to mangle the names of the functions from the other module. This situation typically arises when linking with libraries or .OBJ files compiled with a C compiler&lt;br /&gt;&lt;br /&gt;To tell the C++ compiler not to mangle the name of a function, declare the function as extern "C", like this:&lt;br /&gt;&lt;br /&gt;extern "C" void Cfunc( int );&lt;br /&gt;&lt;br /&gt;This declaration tells the compiler that references to the function Cfunc should not be mangled.&lt;br /&gt;&lt;br /&gt;You can also apply the extern "C" declaration to a block of names:&lt;br /&gt;&lt;br /&gt;extern "C" {&lt;br /&gt;&lt;br /&gt;   void Cfunc1( int );&lt;br /&gt;   void Cfunc2( int );&lt;br /&gt;   void Cfunc3( int );&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;As with the declaration for a single function, this declaration tells the compiler that references to the functions Cfunc1, Cfunc2, and Cfunc3 should not be mangled. You can also use this form of block declaration when the block of function names is contained in a header file:&lt;br /&gt;&lt;br /&gt;extern "C" {&lt;br /&gt;&lt;br /&gt;   #include "locallib.h"&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Note: extern “C” cannot be used with class identifiers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-7833611842290444015?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/7833611842290444015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/translation-units-linkage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7833611842290444015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/7833611842290444015'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/translation-units-linkage.html' title='Translation units &amp; Linkage'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1660451586547264643</id><published>2009-03-24T10:56:00.002+03:00</published><updated>2009-03-24T16:51:54.651+03:00</updated><title type='text'>Duration</title><content type='html'>Duration, closely related to storage class, defines the period during which the declared identifiers have real, physical objects allocated in memory. We also distinguish between compile-time and run-time objects. Variables, for instance, unlike typedefs and types, have real memory allocated during run time. There are three kinds of duration: static, local, and dynamic.&lt;br /&gt;&lt;br /&gt;Static&lt;br /&gt;&lt;br /&gt;Memory is allocated to objects with static duration as soon as execution is underway; this storage allocation lasts until the program terminates. Static duration objects usually reside in fixed data segments allocated according to the memory model in force, although in 32-bit development, only the flat memory model is supported. All functions, wherever defined, are objects with static duration. All variables with file scope have static duration. Other variables can be given static duration by using the explicit static or extern storage class specifiers.&lt;br /&gt;&lt;br /&gt;Static duration objects are initialized to zero (or null) in the absence of any explicit initializer or, in C++, constructor.&lt;br /&gt;&lt;br /&gt;Don't confuse static duration with file or global scope. An object can have static duration and local scope&lt;br /&gt;&lt;br /&gt;Local&lt;br /&gt;&lt;br /&gt;Local duration objects, also known as automatic objects, lead a more precarious existence. They are created on the stack (or in a register) when the enclosing block or function is entered. They are deallocated when the program exits that block or function. Local duration objects must be explicitly initialized; otherwise, their contents are unpredictable. Local duration objects must always have local or function scope. The storage class specifier auto can be used when declaring local duration variables, but is usually redundant, because auto is the default for variables declared within a block. An object with local duration also has local scope, because it does not exist outside of its enclosing block. The converse is not true: a local scope object can have static duration.&lt;br /&gt;&lt;br /&gt;When declaring variables (for example, int, char, float), the storage class specifier register also implies auto; but a request (or hint) is passed to the compiler that the object be allocated a register if possible. C++Builder can be set to allocate a register to a local integral or pointer variable, if one is free. If no register is free, the variable is allocated as an auto, local object with no warning or error.&lt;br /&gt;&lt;br /&gt;Note: The C++Builder compiler can ignore requests for register allocation. Register allocation is based on the compiler's analysis of how a variable is used.&lt;br /&gt;&lt;br /&gt;Dynamic&lt;br /&gt;&lt;br /&gt;Dynamic duration objects are created and destroyed by specific function calls during a program. They are allocated storage from a special memory reserve known as the heap, using either standard library functions such as malloc, or by using the C++ operator new. The corresponding deallocations are made using free or delete.&lt;br /&gt;Static&lt;br /&gt;Syntax&lt;br /&gt;&lt;br /&gt;static "data definition" ;&lt;br /&gt;&lt;br /&gt;static "function name" "function definition" ;&lt;br /&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Use the static storage class specifier with a local variable to preserve the last value between successive calls to that function. A static variable acts like a local variable but has the lifetime of an external variable.&lt;br /&gt;&lt;br /&gt;In a class, data and member functions can be declared static. Only one copy of the static data exists for all objects of the class.&lt;br /&gt;&lt;br /&gt;A static member function of a global class has external linkage. A member of a local class has no linkage. A static member function is associated only with the class in which it is declared. Therefore, such member functions cannot be virtual.&lt;br /&gt;&lt;br /&gt;Static member functions can only call other static member functions and only have access to static data. Such member functions do not have a this pointer&lt;br /&gt;&lt;strong&gt;Easy Swift&lt;/strong&gt;&lt;a href="http://rushbeforetime.blogspot.com/2009/03/translation-units-linkage.html"&gt;Translation Units &amp;amp; Linkage&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1660451586547264643?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1660451586547264643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/duration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1660451586547264643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1660451586547264643'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/duration.html' title='Duration'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8908862286706704904</id><published>2009-03-24T10:42:00.001+03:00</published><updated>2009-03-24T10:46:34.327+03:00</updated><title type='text'>Name spaces &amp; Visibility</title><content type='html'>Name space is the scope within which an identifier must be unique. C uses four distinct classes of identifiers:&lt;br /&gt;Structure, union, and enumeration tags. These must be unique within the block in which they are defined. Tags declared outside of any function must be unique.&lt;br /&gt;         .&lt;br /&gt; goto label names. These must be unique within the function in which they are declared  &lt;br /&gt;&lt;br /&gt;Variables, typedefs, functions, and enumeration members. These must be unique within the scope in which they are defined. Externally declared identifiers must be unique among externally declared variables.&lt;br /&gt;Structure and union member names. These must be unique within the structure or union in which they are defined. There is no restriction on the type or offset of members with the same member name in different structures&lt;br /&gt;&lt;br /&gt;Visibility:&lt;br /&gt;The visibility of an identifier is that region of the program source code from which legal access can be made to the identifier's associated object.&lt;br /&gt;&lt;br /&gt;Scope and visibility usually coincide, though there are circumstances under which an object becomes temporarily hidden by the appearance of a duplicate identifier: the object still exists but the original identifier cannot be used to access it until the scope of the duplicate identifier is ended.&lt;br /&gt;&lt;br /&gt;Note: Visibility cannot exceed scope, but scope can exceed visibility.&lt;br /&gt;&lt;br /&gt;    .&lt;br /&gt;&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;{&lt;br /&gt;   int i; char ch;  // auto by default&lt;br /&gt;   i = 3;           // int i and char ch in scope and visible&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;&lt;br /&gt;   {&lt;br /&gt;      double i;&lt;br /&gt;      i = 3.0e3;    // double i in scope and visible&lt;br /&gt;                    // int i=3 in scope but hidden&lt;br /&gt;      ch = 'A';     // char ch in scope and visible&lt;br /&gt;   }&lt;br /&gt;                    // double i out of scope&lt;br /&gt;   i += 1;          // int i visible and = 4&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;// char ch still in scope &amp;amp; visible = 'A'&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;    .&lt;br /&gt;&lt;br /&gt;// int i and char ch out of scope&lt;br /&gt;&lt;br /&gt;Again, special rules apply to hidden class names and class member names: C++ operators allow hidden identifiers to be accessed under certain conditions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8908862286706704904?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8908862286706704904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/name-spaces-visibility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8908862286706704904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8908862286706704904'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/name-spaces-visibility.html' title='Name spaces &amp; Visibility'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8171124204260502089</id><published>2009-03-24T10:27:00.003+03:00</published><updated>2009-03-24T10:53:11.928+03:00</updated><title type='text'>Storage classes and types</title><content type='html'>Associating identifiers with objects requires each identifier to have at least two attributes: storage class and type (sometimes referred to as data type). The C++Builder compiler deduces these attributes from implicit or explicit declarations in the source code.&lt;br /&gt;&lt;br /&gt;Storage class dictates the location (data segment, register, heap, or stack) of the object and its duration or lifetime (the entire running time of the program, or during execution of some blocks of code). Storage class can be established by the syntax of the declaration, by its placement in the source code, or by both of these factors.&lt;br /&gt;&lt;br /&gt;The type determines how much memory is allocated to an object and how the program will interpret the bit patterns found in the object's storage allocation. A given data type can be viewed as the set of values (often implementation-dependent) that identifiers of that type can assume, together with the set of operations allowed on those values.&lt;br /&gt;The compile-time operator, sizeof, lets you determine the size in bytes of any standard or user-defined type.&lt;br /&gt;&lt;br /&gt;Scope&lt;br /&gt;The scope of an identifier is that part of the program in which the identifier can be used to access its object. There are six categories of scope: block (or local), function, function prototype, file, class (C++ only), and namespace (C++ only). These depend on how and where identifiers are declared.&lt;br /&gt;&lt;br /&gt;Function.&lt;br /&gt;The only identifiers having function scope are statement labels. Label names can be used with goto statements anywhere in the function in which the label is declared. Labels are declared implicitly by writing label_name: followed by a statement. Label names must be unique within a function.&lt;br /&gt;&lt;br /&gt;Block.&lt;br /&gt;The scope of an identifier with block (or local) scope starts at the declaration point and ends at the end of the block containing the declaration (such a block is known as the enclosing block). Parameter declarations with a function definition also have block scope, limited to the scope of the block that defines the function.&lt;br /&gt;&lt;br /&gt;Function prototype.&lt;br /&gt;Identifiers declared within the list of parameter declarations in a function prototype (not part of a function definition) have function prototype scope. This scope ends at the end of the function prototype.&lt;br /&gt;&lt;br /&gt;File.&lt;br /&gt;File scope identifiers, also known as globals, are declared outside of all blocks and classes; their scope is from the point of declaration to the end of the source file.&lt;br /&gt;&lt;br /&gt;Class (C++). A class is a named collection of members, including data structures and functions that act on them. Class scope applies to the names of the members of a particular class.Classes and their objects have many special access and scoping rules;&lt;br /&gt;Condition (C++). Declarations in conditions are supported. Variables can be declared within the expression of if, while, and switch statements. The scope of the variable is that of the statement. In the case of an if statement, the variable is also in scope for the else block.&lt;br /&gt;&lt;br /&gt;Move on to Namspaces&lt;a href="http://rushbeforetime.blogspot.com/2009/03/name-spaces-visibility.html"&gt;and Visibility&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8171124204260502089?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8171124204260502089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/storage-classes-and-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8171124204260502089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8171124204260502089'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/storage-classes-and-types.html' title='Storage classes and types'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-1854938465130835677</id><published>2009-03-24T10:20:00.003+03:00</published><updated>2009-03-24T10:42:16.103+03:00</updated><title type='text'>Language Structure</title><content type='html'>C++ language and its implementation towards easy swift easy programming C++Builder.&lt;br /&gt;&lt;br /&gt;Declarations:&lt;br /&gt;This section briefly reviews concepts related to declarations: objects, storage classes, types, scope, visibility, duration, and linkage. A general knowledge of these is essential before tackling the full declaration syntax. Scope, visibility, duration, and linkage determine those portions of a program that can make legal references to an identifier in order to access its object&lt;br /&gt;&lt;br /&gt;Objects:&lt;br /&gt;An object is a specific region of memory that can hold a fixed or variable value (or set of values). (This use of the word object is different from the more general term used in object-oriented languages.) Each value has an associated name and type (also known as a data type). The name is used to access the object. This name can be a simple identifier, or it can be a complex expression that uniquely references the object.&lt;br /&gt;The type is used&lt;br /&gt;&lt;br /&gt;to determine the correct memory allocation required initially.&lt;br /&gt;to interpret the bit patterns found in the object during subsequent accesses.&lt;br /&gt;in many type-checking situations, to ensure that illegal assignments are trapped.&lt;br /&gt;&lt;br /&gt;C++Builder supports many standard (predefined) and user-defined data types, including signed and unsigned integers in various sizes, floating-point numbers in various precisions, structures, unions, arrays, and classes. In addition, pointers to most of these objects can be established and manipulated in memory.&lt;br /&gt;&lt;br /&gt;The C++Builder standard libraries and your own program and header files must provide unambiguous identifiers (or expressions derived from them) and types so that C++Builder can consistently access, interpret, and (possibly) change the bit patterns in memory corresponding to each active object in your program.&lt;br /&gt;&lt;br /&gt;Objects and declarations:&lt;br /&gt;&lt;br /&gt;Declarations establish the necessary mapping between identifiers and objects. Each declaration associates an identifier with a data type. Most declarations, known as defining declarations, also establish the creation (where and when) of the object; that is, the allocation of physical memory and its possible initialization. Other declarations, known as referencing declarations, simply make their identifiers and types known to the compiler. There can be many referencing declarations for the same identifier, especially in a multifile program, but only one defining declaration for that identifier is allowed.&lt;br /&gt;&lt;br /&gt;Generally speaking, an identifier cannot be legally used in a program before its declaration point in the source code. Legal exceptions to this rule (known as forward references) are labels, calls to undeclared functions, and class, struct, or union tags. rvalues&lt;br /&gt;&lt;br /&gt;The expression a + b is not an lvalue: a + b = a is illegal because the expression on the left is not related to an object. Such expressions are often called rvalues (short for right values).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lvalues&lt;br /&gt;&lt;br /&gt;An lvalue is an object locator: an expression that designates an object. An example of an lvalue expression is *P, where P is any expression evaluating to a non-null pointer. A modifiable lvalue&lt;br /&gt;is an identifier or expression that relates to an object that can be accessed and legally changed in memory. A const pointer to a constant, for example, is not a modifiable lvalue. A pointer to a constant can be changed (but its dereferenced value cannot).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ezinearticles.com/" target="_new"&gt;&lt;img alt="As Featured On EzineArticles" src="http://ezinearticles.com/featured/images/ea_featured_70_3.gif" border="0" /&gt; &lt;/a&gt;&lt;br /&gt;Historically, the l stood for "left," meaning that an lvalue could legally stand on the left (the receiving end) of an assignment statement. Now only modifiable lvalues can legally stand to the left of an assignment statement. For example, if a and b are nonconstant integer identifiers with properly allocated memory storage, they are both modifiable lvalues, and assignments such as a = 1; and b = a + b are legal.&lt;br /&gt;With these fundamentals defimatly progamming will have to be &lt;strong&gt;Easy &lt;/strong&gt;&lt;a href="http://rushbeforetime.blogspot.com/2009/03/storage-classes-and-types.html"&gt;&lt;strong&gt;Swift Continue&lt;/strong&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-1854938465130835677?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/1854938465130835677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/learn-to-swift-easy-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1854938465130835677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/1854938465130835677'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/learn-to-swift-easy-programming.html' title='Language Structure'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-5098244383895173295</id><published>2009-03-23T16:57:00.006+03:00</published><updated>2009-03-23T17:13:16.451+03:00</updated><title type='text'>Home Wave Programming</title><content type='html'>I have a 2GB DV MP5, MP4 Digital Player. I like the device as it comes with, a camera, player, video and also a webcam USB camera. &lt;div&gt;&lt;br /&gt;The only thing that disturbs me much is I can listen to the radio unless I insert the ear phone to improvise the antenna. Given the radio application, I wonder if it’s  possible to program (write a code) in a way that would configure my radio application to receive signals that can be actually be close to an internet connection.&lt;a target="_new" href="http://ezinearticles.com/"&gt;&lt;img src="http://ezinearticles.com/featured/images/ea_featured_4.gif" border="0" alt="As Featured On EzineArticles" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;In other words, can the radio your listening to or the Aver TV card in your PC receive signals that can be interpreted through a programmed application be harnessed and with the blue tooth technology, establish an internet connection?&lt;br /&gt;&lt;br /&gt;We had several ideas of how to easy program and experiment if it were possible but there happened to be draw backs along. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;1. The radio waves been received by the media player with the radio receiver were not detected by our Blue tooth device.&lt;br /&gt;2. Owing to the varying between the blue tooth device communicating frequency and the radio waves, there cropped a difficult situation. Communication between devices is very important as we can be able to analyze the waves and set our frequency settings.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;We are still looking at this small project. We have no doubt that you might have an idea on how we can easily program more preferably in C++. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;Programming gives the ability to see things happen before they are created, let as wait and see.&lt;a target="_new" href="http://EzineArticles.com/"&gt;&lt;br /&gt;&lt;img src="http://EzineArticles.com/featured/images/ea_featured_4.gif" border="0" alt="As Featured On EzineArticles"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Swift, Easy&lt;a href="http://rushbeforetime.blogspot.com/2009/03/programming-deeper.html"&gt;Big Programming&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-5098244383895173295?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/5098244383895173295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/home-wave-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5098244383895173295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/5098244383895173295'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/home-wave-programming.html' title='Home Wave Programming'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8086427382287284638</id><published>2009-03-19T17:27:00.001+03:00</published><updated>2009-03-20T12:59:44.562+03:00</updated><title type='text'>Idea: Phone Programming</title><content type='html'>Programming has gone up to another level. I was looking at my phone and at one point an idea came up my mind.&lt;br /&gt;&lt;br /&gt;How can we program to make things easy and swifter?&lt;br /&gt;I’ve got an idea. New phones are been poured in the market every day.&lt;br /&gt;What if you programmed a phone that could do the following for you?&lt;br /&gt;&lt;br /&gt;When you get in a dark room, you don’t have to look for the switch. Reach for the phone in the pocket scroll through your menu, select switch icon and click lights on. This would be very secure as will make a move once the lights are on.&lt;br /&gt;&lt;br /&gt;Oh yah I forgot, we parked our car but left the keys inside the car. How can programming save us this time? Lets program the same phone in such a way that I don’t have to go out of the house again to set the car alarm on or break the window to get my keys. Possible. Select menu on your phone, select the related icon car for example and press alarm on. Or the function can be coded in such a way you can memorize the numbers if that’s not to tiresome. Number 1 for lights, Number 2 for stereo play and so on.&lt;br /&gt;&lt;br /&gt;This can help prevent young teens from getting your car without your permission. Know how? To enable the alarm or security of the car you have to enter the pin in the phone unlike leaving your keys lying on the table. Yes, that is what I call easy programming. You know this can reduce teens driving without licenses. Meaning that road accidents will also be less. Should we continue programming?&lt;br /&gt;&lt;br /&gt;With the easy programming code, the phone can be so small that no one can really believe that you control everything in your house by just using that small programmed phone.&lt;br /&gt;Other possibilities are like enabling door locks, controlling you stereo.&lt;br /&gt;Probably you’ve got something else the phone can do. Programming is the paths to the future so what ever you do continue programming.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ezinearticles.com/" target="_new"&gt;&lt;br /&gt;&lt;img alt="As Featured On EzineArticles" src="http://ezinearticles.com/featured/images/ea_featured_4.gif" border="0" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8086427382287284638?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8086427382287284638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/programming-deeper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8086427382287284638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8086427382287284638'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/programming-deeper.html' title='Idea: Phone Programming'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3587916771013844549</id><published>2009-03-17T16:26:00.000+03:00</published><updated>2009-03-17T17:25:09.152+03:00</updated><title type='text'>Programming: Borland C++</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;The DOS programming application provides a user friendly and easy&lt;br /&gt;to understand programming ground.&lt;br /&gt;The Borland C++ compiler can be configured to wok on any PC. You don’t have to panic that your PC is too old. Start programming with what you have.&lt;a href="http://2.bp.blogspot.com/_Sa2pr_2eCGo/Sb-o0XLrKII/AAAAAAAAAAY/ZeBJTEhJd2o/s1600-h/Screen+1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5314151702850119810" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 262px" alt="" src="http://2.bp.blogspot.com/_Sa2pr_2eCGo/Sb-o0XLrKII/AAAAAAAAAAY/ZeBJTEhJd2o/s320/Screen+1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Lets Go through an example:&lt;br /&gt;The first input is your library headers example #include&lt;stdio.h&gt;. This tells the compiler to check in the library standard input /out put for the functions that were used in your source program. Example is the main() function.&lt;br /&gt;Main() is the beginning of your source file although other source code may come before the main() function. These are mainly function &lt;a href="http://1.bp.blogspot.com/_Sa2pr_2eCGo/Sb-sbCIjKWI/AAAAAAAAAAg/LRsUvOmlLUY/s1600-h/untitled+2.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5314155665749649762" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 274px" alt="" src="http://1.bp.blogspot.com/_Sa2pr_2eCGo/Sb-sbCIjKWI/AAAAAAAAAAg/LRsUvOmlLUY/s320/untitled+2.bmp" border="0" /&gt;&lt;/a&gt;defined by the developer, constants, global variables and many more.&lt;br /&gt;By typing a keyword on the screen, it is possible to get help and examples by placing the cursor below the start of the keyword and then pressing Ctl+F1In the example below the word disk has been type in disk for example as shown on the screen beside.&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;On pressing Ctl+F1 you get:&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_Sa2pr_2eCGo/Sb-ujHeargI/AAAAAAAAAAo/5aVZSJwhbcM/s1600-h/screen+3.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5314158003645754882" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 257px" alt="" src="http://4.bp.blogspot.com/_Sa2pr_2eCGo/Sb-ujHeargI/AAAAAAAAAAo/5aVZSJwhbcM/s320/screen+3.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_Sa2pr_2eCGo/Sb-wYiuZv1I/AAAAAAAAAAw/6UzusOGqADs/s1600-h/screen+4.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5314160021005254482" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 264px" alt="" src="http://1.bp.blogspot.com/_Sa2pr_2eCGo/Sb-wYiuZv1I/AAAAAAAAAAw/6UzusOGqADs/s320/screen+4.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;A list of function words with the name disk. Choose the function you wish to use and click on it. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;As you can see you are presented with how the function is used and all the variables it can hold.&lt;br /&gt;Try choosing functions that you are familiar with and look at the examples that have been given. Read, Think and Analyze, those are the stream line boosters to swift easy programming.&lt;br /&gt;So next time if someone ask you how to program you will be in a position to hint out what you know.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3587916771013844549?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3587916771013844549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/programming-borland-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3587916771013844549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3587916771013844549'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/programming-borland-c.html' title='Programming: Borland C++'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Sa2pr_2eCGo/Sb-o0XLrKII/AAAAAAAAAAY/ZeBJTEhJd2o/s72-c/Screen+1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-3366424492525197829</id><published>2009-03-12T09:11:00.000+03:00</published><updated>2009-03-20T07:51:09.643+03:00</updated><title type='text'>Basics</title><content type='html'>Understand the following so as get a strong structural understanding:&lt;br /&gt;1.Local Variable&lt;br /&gt;2.Global Variables&lt;br /&gt;3.Storage Class Specifiers&lt;br /&gt;4.Extern&lt;br /&gt;5.Static Variables&lt;br /&gt;6.Static Local , Global Variables and Register Variables&lt;br /&gt;7.Assignment Statements&lt;br /&gt;8.Mutiple Assignments&lt;br /&gt;9.Type Conversition&lt;br /&gt;10.Variable Initialization&lt;br /&gt;11.ConstantsOperators&lt;br /&gt;12.Type Converstion&lt;br /&gt;13.Cast&lt;br /&gt;The above are very important&lt;br /&gt;Close Look&lt;a href="http://mycplus.com/tutorials/c-programming-tutorials/basic-dataypes-and-operators-in-c-programming/"&gt;at programming basics&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-3366424492525197829?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/3366424492525197829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/understand-following-so-as-get-strong.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3366424492525197829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/3366424492525197829'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/understand-following-so-as-get-strong.html' title='Basics'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-8094470860450816238</id><published>2009-03-09T17:19:00.000+03:00</published><updated>2009-03-20T07:32:18.302+03:00</updated><title type='text'>Hitting The Road: Start Programming</title><content type='html'>How to start programming? Yes you can do it in an hour. Get the numerous made simple programming tools under google search.&lt;br /&gt;&lt;br /&gt;Tools offer a simpler and more elaborate manner of programming. Why go back to the days of starting from scratch when all the programmers are serving on the new programming made simple tools.&lt;br /&gt;&lt;br /&gt;These tools have templates and easy to use interface, that allows you to choose components you want to use in your program. They allow you to directly modify the properties of the components with ease. This cuts down your developing time by nearly 80%.&lt;br /&gt;&lt;br /&gt;By saving your templates you can reuse them. How simple.&lt;br /&gt;1Open a made simple programming tool&lt;br /&gt;2. Create a new file&lt;br /&gt;3. Place the components you want to use in your application&lt;br /&gt;4. Change prosperities of the components to suite the way you want them to work&lt;br /&gt;5. Enter your code&lt;br /&gt;6. Use a resource builder to bid your projects to executable Win applications&lt;br /&gt;7. Get market for your applications&lt;br /&gt;What seems to be a scary storm turn out to be a clear sky, sunny day.&lt;br /&gt;So will you give it a try?&lt;br /&gt;&lt;br /&gt;Programming is every where. You have it in your mind you only need that breakthrough to put it down and there you go. I want you to see the potential that lies within you and that’s what you need to use.&lt;br /&gt;&lt;br /&gt;One other thing you need to have is a source of what you want. I used movies to get me the mood of programming. I used to be amazed by a 15 year boy hacking on behalf of the detective computer guy. Sweet lies. But this really boosted me. What builds your moral? Use it to direct you to get hold of your programming world.&lt;br /&gt;&lt;br /&gt;Borland C&lt;a href="http://rushbeforetime.blogspot.com/2009/03/programming-borland-c.html"&gt;Example&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-8094470860450816238?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/8094470860450816238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/hitting-road-start-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8094470860450816238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/8094470860450816238'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/hitting-road-start-programming.html' title='Hitting The Road: Start Programming'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1207158706356918489.post-2367215077707206615</id><published>2009-03-05T11:57:00.000+03:00</published><updated>2009-03-05T11:59:11.215+03:00</updated><title type='text'>Who Can Program Better Than You?</title><content type='html'>In the old time when people used to program using difficult codes no one ever thought of joining classes as the lessons were similar to counting the sand particles in the Sea.&lt;br /&gt;&lt;br /&gt;Now look what is happening in the Markets, in the Industry and even with Private, Businesses.&lt;br /&gt;&lt;br /&gt;Any programming language is earning a red carpet welcoming as the demand to design, build and manage the overall activities in the World Market fetches for more simple but more sophisticated applications to satisfy their market needs.&lt;br /&gt;So where have those who are willing to learn the any programming language gone? When I started learning my first programming language I made one terrible mistake.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I showed no Interest in learning how to program and this made my learning more difficult.&lt;br /&gt;&lt;br /&gt;Interest is the drive to learning any programming language that you dream to be perfect in.&lt;br /&gt;&lt;br /&gt;The secret to program lies in you. You know why?&lt;br /&gt;You might have had a chat on the net and someone happened to tell you that he is good is bringing down PCs, or any one you find in the streets brags how good they are when it comes to programming. But give them a paper and a pen; ask then to write a simple code. What happens? They begin to breathe like furious buffalos. They simply can’t put it down on paper. Why?&lt;br /&gt;These clearly show that there is love for programming but few know how to tap it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You have to realize that programming is learning a new language all together. The only difference is that the time frame of understanding depends on you. The spirit you put in the learning and the will all depend on how long you will start making the smallest application.&lt;br /&gt;I remember when I was learning, my classmate was more or like born with the programming language in his blood. He fell in love with the technical writing of the language, he would narrate of how he feels relieved when he sits on his desk and builds an application the same way a kid would build a house from light blocks.&lt;br /&gt;That’s the trick! You get bound to the styles, rules, conditions, and the format. &lt;br /&gt;&lt;br /&gt;Try it now, give yourself a one week trial and discover what you can do. The power comes out of your finger tips. To lighten your burden let other know what blocks you when it comes to understanding the real "meat" of the language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1207158706356918489-2367215077707206615?l=swifteasyprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://swifteasyprogramming.blogspot.com/feeds/2367215077707206615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/who-can-program-better-than-you_05.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2367215077707206615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1207158706356918489/posts/default/2367215077707206615'/><link rel='alternate' type='text/html' href='http://swifteasyprogramming.blogspot.com/2009/03/who-can-program-better-than-you_05.html' title='Who Can Program Better Than You?'/><author><name>Walker</name><uri>http://www.blogger.com/profile/01408290126257301782</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
