<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.foxite.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Anil Sharma</title><link>http://weblogs.foxite.com/vfpdotnet/default.aspx</link><description>This is my Blog For VFP and VB.NET just sharing my programming experience with all u. U all are welcome here! :)</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>How to Select Accounts/item in Forms with Sql/MySql Backend</title><link>http://weblogs.foxite.com/vfpdotnet/archive/2008/10/04/7011.aspx</link><pubDate>Sat, 04 Oct 2008 08:55:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:7011</guid><dc:creator>vfpdotnet</dc:creator><slash:comments>2</slash:comments><comments>http://weblogs.foxite.com/vfpdotnet/comments/7011.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpdotnet/commentrss.aspx?PostID=7011</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/7011.aspx</wfw:comment><description>When i started developing software with VFP/SQL  my initial problem was the select the accounts or items in my data entry forms. ...(&lt;a href="http://weblogs.foxite.com/vfpdotnet/archive/2008/10/04/7011.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=7011" width="1" height="1"&gt;</description><enclosure url="http://weblogs.foxite.com/vfpdotnet/attachment/7011.ashx" length="4452" type="application/x-unknown" /><category domain="http://weblogs.foxite.com/vfpdotnet/archive/category/1073.aspx">VFP</category></item><item><title>How to See the Changes in Sql Database Without Doing Requery/Refresh</title><link>http://weblogs.foxite.com/vfpdotnet/archive/2008/09/27/Anil_Sharma.aspx</link><pubDate>Fri, 26 Sep 2008 22:47:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:6915</guid><dc:creator>vfpdotnet</dc:creator><slash:comments>2</slash:comments><comments>http://weblogs.foxite.com/vfpdotnet/comments/6915.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpdotnet/commentrss.aspx?PostID=6915</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/6915.aspx</wfw:comment><description>These days most of guys changing the back end Database from vfp table to &lt;b&gt;RDBMS. &lt;/b&gt;When we start developing software with msSql/mysql as backend. We face problem from our customers they keep u insist to make software same as they was using before in dos or vfp. Where he wants same&amp;nbsp; &lt;b&gt;next previous first last buttons &lt;/b&gt;on same data entry screen. Now how u connect to RDMS in your forms. U have few options. But all can't see the changes in your database once you open the form. So For example in Hospital Doctor cant see the next patient in his prescription Data entry form until he close and open his form or press re query button and go thorough which are the new patient added. As All of Data access method just work as snapshot of database (Like ADO.NET). So After opening the form u don't know if the records are added, edited or deleted!. &lt;br&gt;&lt;br&gt;&lt;font face="Courier New"&gt;&lt;b&gt;Methods&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shows u Exact Data&lt;br&gt;&lt;/b&gt;Remote Views&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes (required re query)&lt;br&gt;Sqlexec Query Table&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;Yes (required re query)&lt;br&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;CursorAdapter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;Yes (required re query)&lt;br&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;ADO Control&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes (Only in dynamic cursor)&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/font&gt;&lt;br&gt;So how we design our tables so we can always fresh tables. All experts say use parametrize forms &lt;b&gt;why u need first next last buttons&lt;/b&gt;. Get value from user to search rather than those buttons. Hummm, we can understand but who go'na teach our customers?. he says i m paying you so do it for me. So its not much difficult either :)&amp;nbsp; &lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lets start with same Scenario We have OPD table which stores the daily patient record. At reception receptionist is registering the patient and doctor is giving his comments on same records. so how we can give doctor the real live data without closing and reopening the form. Lets see.&lt;br&gt;&lt;br&gt;&lt;font color="#008000"&gt;***First we get the last entered record.&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;=SQLEXEC(loSqlConnection,'Select max(pkKeyID) as PkKeyID FROM OPDTABLE','OPDMAIN')&lt;br&gt;&lt;/font&gt;&lt;font color="#008000"&gt;**Make a Method in Form Give him the PkKeyID to display the record&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;ThisForm.ShowFreshRecord(OPDMAIN.PKKEYID)&lt;br&gt;&lt;/font&gt;&lt;br&gt;&lt;b&gt;METHOD : ShowFreshRecord&lt;br&gt;&lt;/b&gt;&lt;font color="#0000ff"&gt;Lparameters pKeyID&lt;br&gt;*** Now we fetch the total record to show the record on form Bound ur form controls with this returned table. &lt;br&gt;=SQLEXEC(loSqlConnection,'Select FROM OPDTABLE where pkKeyID =?PKeyID' ,'OPD')&lt;br&gt;RETURN&lt;br&gt;&lt;/font&gt; 
&lt;br&gt;So your form is displaying the Last Record. so now when this paitent gona outside and new paitent is coming in doctor's cabin. what will Doctor Do he will press the next button on form!.&lt;br&gt;&lt;br&gt;&lt;b&gt;METHOD : NextButton.Click&lt;br&gt;&lt;/b&gt;&lt;font color="#008000"&gt;** We have to find the next entered record in database.&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;=SQLEXEC(loSqlConnection,'Select min(pkKeyID) as PkKeyID FROM OPDTABLE where pkKeyID &amp;gt;?OPDMAIN.PkKeyID ','OPDMAIN')&lt;br&gt;&lt;/font&gt;&lt;font color="#008000"&gt;** We found the next record so we have to fresh the form now! &lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;ThisForm.ShowFreshRecord(OPDMAIN.PKKEYID)&lt;br&gt;&lt;/font&gt;
&lt;br&gt;Now the previous patient come back to ask doctor about prescription. So doctor have to click on Prior Button!.&lt;br&gt;&lt;br&gt;&lt;b&gt;METHOD : PriorButton.Click&lt;br&gt;&lt;/b&gt;
&lt;font color="#008000"&gt;** We have to find the prior entered record in database.&lt;br&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;=SQLEXEC(loSqlConnection,'Select max(pkKeyID) as PkKeyID FROM OPDTABLE where pkKeyID &amp;lt;?OPDMAIN.PkKeyID ','OPDMAIN')&lt;br&gt;&lt;/font&gt;
&lt;font color="#008000"&gt;** We found the prior record so we have to fresh the form now! &lt;br&gt;
&lt;/font&gt;&lt;font color="#0000ff"&gt;ThisForm.ShowFreshRecord(OPDMAIN.PKKEYID)&lt;br&gt;&lt;/font&gt;

&lt;br&gt;So by these tricks when ever doctor is moving in records he always have the fresh record and live database so he can see the all changes in database adding editing deleting!. Even we have not consumed the resources.&amp;nbsp; Hopes you like my tricks any more suggesstion or critic? your are welcome here..&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=6915" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/vfpdotnet/archive/category/1073.aspx">VFP</category></item><item><title>Why you need Config.Fpw File?</title><link>http://weblogs.foxite.com/vfpdotnet/archive/2008/09/16/6799.aspx</link><pubDate>Tue, 16 Sep 2008 03:30:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:6799</guid><dc:creator>vfpdotnet</dc:creator><slash:comments>4</slash:comments><comments>http://weblogs.foxite.com/vfpdotnet/comments/6799.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/vfpdotnet/commentrss.aspx?PostID=6799</wfw:commentRss><wfw:comment>http://weblogs.foxite.com/rsscomments/6799.aspx</wfw:comment><description>Most of the programmers does not use the config.fpw file at least in
INDIA where i live. The reason behind this most of the time we forget
to make a config.fpw on client site. Some time application is running
on 10+ computers so its need time to add config.fpw in all the
computers. may be still some people around there who really dont know
what is the purpose of config.fpw file?. &lt;br&gt;That is the configuration
file for vfp. vfp reads it before starting so here we can specify the
things the most common are by Rick Schummer which he wrote in his blog.&lt;br&gt;&lt;br&gt;&lt;span&gt;RESOURCE = OFF&lt;br&gt;ALLOWEXTERNAL = ON&lt;br&gt;_BROWSER = ""&lt;br&gt;_BUILDER = ""&lt;br&gt;_FOXREF = ""&lt;br&gt;_CONVERTER = ""&lt;br&gt;_COVERAGE&lt;br&gt;_GALLERY = ""&lt;br&gt;_GENGRAPH = ""&lt;br&gt;_GENHTML = ""&lt;br&gt;_GENMENU = ""&lt;br&gt;_GENPD = ""&lt;br&gt;_GENSCRN = ""&lt;br&gt;_GENXTAB = ""&lt;br&gt;_TASKPANE = ""&lt;br&gt;_TOOLBOX = ""&lt;br&gt;_TRANSPORT = ""&lt;br&gt;_WIZARD = ""&lt;/span&gt;&lt;br&gt;TMPFILES&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; = C:\TEMP&lt;br&gt;SORTWORK&amp;nbsp; = C:\TEMP&lt;br&gt;PROGWORK = C:\TEMP&lt;br&gt;INDEXWORK=C:\TEMP&lt;br&gt;&lt;br&gt;&lt;span&gt;ALLOWEXTERNAL&amp;nbsp;
is just introduced in vf8 that gives us the power to include the
config.fpw&amp;nbsp; in your project under others as a text file. But what if
you need to use the new config.fpw file on client site? allowexternal
command allow us to send a parameter for new config.fpw with your
application. in the shortcut of your application u can specify the
config.fpw file like&lt;br&gt;&lt;br&gt;&lt;b&gt;yourapplication.exe -cc:\yourfolder\config2.fpw&lt;br&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br&gt;&lt;/b&gt;When you create your own custom OLE Automation servers, the OLE classes you
create are delivered in either a .dll or an .exe file. Before you build the
.exe or .dll, add the Config.fpw file into the project and make sure it is
marked as included. At run time, the Config.fpw that resides inside of the
.exe or .dll file is used.
To specify a different Config.fpw file once an OLE Automation Server is
distributed, you have &amp;nbsp; modify the
registry key for the OLE server.&amp;nbsp;
and have to add like this&lt;br&gt;&lt;pre class="in_text"&gt; C:\temp\YourautomationExeFile.exe /automation -CC:\temp\CONFIG.FPW&lt;br&gt;&lt;/pre&gt;&lt;br&gt;The
variables start with _ all are the vfp native variables which holds the
file name by emptying these variables in vfp, Vfp runs faster well its
a fraction of second fast :) but fast. and the tmpfile,sortwork
progwork,indexwork these commands are very useful when u developing a
application for &lt;b&gt;multiuser enviornment&lt;/b&gt;.These Variables are good to use with foxpro for dos or OS&amp;nbsp; Prior To Windows XP.So when u making cursor
or doing index vfp uses temporary files so these variables force vfp to
make temporary files to the specific folder not on the network. That
will increase the speed. Just make a config.fpw file in your production
and include it into the project under others as text file. In case of Windows XP and Above windows is too smart to handle the data in windows temp folder automatically. &lt;br&gt;&lt;br&gt;Those who use &lt;b&gt;_screen.visible = .F.&lt;/b&gt;
in there main.prg to overrid the main vfp window they shoule use
command screen = off into the config.fpw file. Becaz. when u do
_screen.visible in your Main.Prg your application opens and gives u a &lt;b&gt;Flash!&lt;/b&gt; . So to elminate that flash use &lt;b&gt;screen = off&lt;/b&gt; in your config.fpw file.&lt;br&gt;&lt;br&gt;&lt;br&gt;This
is my entry in my blog. So not much having experince to write the Blog.
So when u open your eyes that is the Morning For u! :)&lt;br&gt;&lt;br&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=6799" width="1" height="1"&gt;</description><enclosure url="http://weblogs.foxite.com/vfpdotnet/attachment/6799.ashx" length="287" type="application/x-unknown" /><category domain="http://weblogs.foxite.com/vfpdotnet/archive/category/1073.aspx">VFP</category></item></channel></rss>