<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-19206046</atom:id><lastBuildDate>Tue, 08 Dec 2009 10:05:59 +0000</lastBuildDate><title>GoDB Developer Network</title><description>Welcome to the unofficial GoDB Developer Network. 

This blog is completely dedicated to GoDB platform -- a multi platform Mobile RAD tool for developing handheld and wireless applications for Windows Mobile (Pocket PC,Win CE, Smartphones), Palm, Symbian, Embedded Linux, Linux, Win 32, etc. 

Fellow GoDB developers can find sample codes, contribute to the blog and Mobility related news for the benefit of the mobile development community as a whole.</description><link>http://godbdevnet.blogspot.com/</link><managingEditor>noreply@blogger.com (Author)</managingEditor><generator>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-116289626960723862</guid><pubDate>Tue, 07 Nov 2006 10:29:00 +0000</pubDate><atom:updated>2006-11-07T02:44:33.546-08:00</atom:updated><title>Chart control in GoDB</title><description>One of the cool features added in &lt;a href="http://www.go-db.com/"&gt;version 3.9&lt;/a&gt; is the chart control.&lt;br /&gt;&lt;br /&gt;Let me provide you the gist before going into the details:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Best part:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The GoDB Chart Control can Display Charts from data in Arrays or Data from SQL Statements using DB_RSARRAY. &lt;/li&gt;&lt;li&gt;Supports different types of charts (pie, line, bar) with minimum coding... &lt;/li&gt;&lt;li&gt;Highly useful for platforms (ex: symbian, palm, etc) where GUI charts are non-existent / pain till now&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Other side of the coin:&lt;br /&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Chart control is not available in the evaluation version. One need to purchase the chart control separately with GoDB Enterprise edition (full version). &lt;/li&gt;&lt;li&gt;The best part becomes worst part if you don't have a full version &amp;amp; do not intend to purchase the chart control as an add on&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Best bet if there is a large and emcompassing requirement to build feature rich charts. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;Type of Charts available:&lt;br /&gt;&lt;br /&gt;The below links provide samples / syntax on how to create / use line, pie and bar charts&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="50" border="0" /&gt;Chart Tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#linechart"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Line Chart&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#xlegend"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Chart With X Legend Texts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#multiple"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Charts With Multiple Data Streams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#barchart"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Bar Charts With Multiple Data Streams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#hbar"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Horizonal Bar Charts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#hbarmdata"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Horizonal Bar Charts With Multiple Data Streams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#chartwithlabel"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Chart with Chart Labels, Chart Legend and Chart Event handling&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#diffchart"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Different Chart Types for Different Data Streams&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#chartwithclr"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Chart with Colors Specified for Points&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#piechart"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Pie Charts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#dbdrivenchart"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Database Driven Charts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.go-db.com/GoDB_manual/NewTutorials/ChartTutorial/ChartControl.Html#dbdrivenchartmpdata"&gt;&lt;img height="15" src="http://www.go-db.com/GoDB_manual/spacer.gif" width="100" border="0" /&gt;Database Driven Charts With Multiple Data Streams&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-116289626960723862?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2006/11/chart-control-in-godb.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>16</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113438348985977248</guid><pubDate>Mon, 12 Dec 2005 09:28:00 +0000</pubDate><atom:updated>2005-12-12T02:31:30.246-08:00</atom:updated><title>Using Web Services with GBasic (GoDB)</title><description>This article shall peep into invoking a webservice from the internet through GoDB. Iam using HTTPDNLD file and XML commands of GoDB.&lt;br /&gt;&lt;br /&gt;The application takes the input of a host name and queries a WHOIS server through webservices and gets the detailed information.&lt;br /&gt;&lt;br /&gt;For this, I am using &lt;a href="http://www.webservicex.net"&gt;http://www.webservicex.net&lt;/a&gt; . You can use other WHOIS server though.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configuring the proxy:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;for those having a proxy, you need to configure first before using the application. To go to Configuration screen (inbuilt with GoDB) press Function key 9 (F9). Fillin only the 'ProxyIP' field with your Proxy server. Leave other fields. Click 'save' and 'Go Home'&lt;br /&gt;&lt;br /&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/home.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Querying the web:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/whois.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/whois.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;the &lt;strong&gt;httpdnld &lt;/strong&gt;command sends a http request with a host name as the parameter to a webservice. The webservice inturn queries a whois server and sends the result back. The result is saved in a file called test.xml&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;path$=&lt;a href="http://www.webservicex.net/whois.asmx/GetWhoIS?HostName="&gt;http://www.webservicex.net/whois.asmx/GetWhoIS?HostName=&lt;/a&gt;+trim$(#txtName$)&lt;br /&gt;RET=HTTPDNLD(path$,"","TEST.XML",1)&lt;br /&gt;if RET=-3 then&lt;br /&gt;msgbox "unable to get file"&lt;br /&gt;endif&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Parsing the XML:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Now, having created a XML file, we need to parse and display the content in the application for view. Since, the parse is inbuilt in GoDB, my work is much reduced- precisely four lines.&lt;br /&gt;&lt;br /&gt;h=XMLParseFile("TEST.XML",1)&lt;br /&gt;&lt;br /&gt;if ret&gt;0 then&lt;br /&gt;ret= XMLGoToFirst(h)&lt;br /&gt;while XMLFetch(h,"")=1&lt;br /&gt;str$=str$+ xvalue$(h)&lt;br /&gt;pprint xpath$(h) ; xvalue$(h)&lt;br /&gt;&lt;br /&gt;wend&lt;br /&gt;endif&lt;br /&gt;&lt;br /&gt;ret=XMLClose(h)&lt;br /&gt;#txtRes$=str$&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/google.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/google.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Overall, if you see, I put up a simple form to enter the host name, a button to query the web and a text area to print the queried results. I stored the data in XML format, parsed it and and displayed in the text area. A variance can be, instead of saving it in XML format, we can also save the same in .txt format and display.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.consigntech.com/downloads/34/samples/NETDOWNLOAD.zip"&gt;&lt;img src="http://photos1.blogger.com/blogger/3043/1836/320/GoDB_wing.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;                                                                       HTTPDOWNLOAD.ZIP&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113438348985977248?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/12/using-web-services-with-gbasic-godb.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>6</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113393725327812555</guid><pubDate>Wed, 07 Dec 2005 06:25:00 +0000</pubDate><atom:updated>2005-12-06T22:40:00.273-08:00</atom:updated><title>Plotting charts with GoDB</title><description>&lt;div align="left"&gt;With GoDB you can construct graphs and charts- both static and dynamic quite easily and pep up your data presentation. This article will touch the shallow waters of charting with static data. End of the article there is a link to download the source code for this charting application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;First some definitions:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;''*****************************************************************&lt;br /&gt;''''SOME VARIABLES THAT CAN BE INCLUDED IN THE QUERY STRING ARE&lt;br /&gt;&lt;br /&gt;'XMargin = 20 MARGIN WIDTH BETWEEN COORDINATES IN X LEGEND&lt;br /&gt;'XOrigin = 5 STARTING X1 POSITION OF RECTANGLE&lt;br /&gt;'XRange = 190 X2-530, XRANGE IS DIFF OF X1 AND X2&lt;br /&gt;'XDiv = 5 NO. OF DIVISIONS IN X AXIS&lt;br /&gt;&lt;br /&gt;'YMargin = 20 MARGIN WIDTH BETWEEN COORDINATES IN Y LEGEND&lt;br /&gt;'YOrigin = 210 STARTING Y1 POSITION OF RECTANGLE&lt;br /&gt;'YRange = 200 YRANGE IS DIFF OF Y1 AND Y2&lt;br /&gt;'YDiv = 5 NO. OF DIVISIONS IN Y AXIS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'ShowData = 1 TO DISPLAY DATA, WHILE PLOTTING POINTS&lt;br /&gt;&lt;br /&gt;'Type = 1 LINE CHART&lt;br /&gt;'Type = 2 BAR CHART&lt;br /&gt;''*****************************************************************&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'XAXIS$ = LIST OF X COORDINATES&lt;br /&gt;'YAXIS$ = LIST OF Y COORDINATES&lt;br /&gt;&lt;br /&gt;'SAMPLE COORDINATES&lt;br /&gt;'XAxis$ = "1999,2000,2001,2002,2003,2004,2005,2006,2007,2008, 2009"&lt;br /&gt;'YAxis$ = "50.340,83,737,90.50,400,300,200,200,400, 200, 300"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bar Chart: &lt;/strong&gt;&lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/barchart.1.jpg"&gt;&lt;strong&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/barchart.1.jpg" border="0" /&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; Drawing the rectangle bar &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;to draw the rectangle bar, use drawrect function&lt;br /&gt;&lt;br /&gt;ex: drawrect(XOrigin-10,YOrigin,XRange+30,-YRange,2,0,46815,46815)&lt;br /&gt;&lt;br /&gt;For Color coding the bar use Fillrect function&lt;br /&gt;&lt;br /&gt;ex: fillrect(XOrigin,YOrigin,XRange,-YRange,46815)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Line charts:&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Line charts invovle two basic components. Plotting the data and drawing line.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PLOTTING DATA&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;If ubound(Str$) &gt; 0 Then &lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/line%20chart.1.jpg"&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/line%20chart.1.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;For Count = 0 to ubound(Str$)&lt;br /&gt;If Count=0 Then&lt;br /&gt;m1=split(arrY$,Str$(Count),",")&lt;br /&gt;ElseIf Count = 1 Then&lt;br /&gt;m1=split(arrY$,Str$(Count),",")&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;for i = 0 to NoOfPoints - 1&lt;br /&gt;DataX = atol(arrX$(i))&lt;br /&gt;NewX = TransX(DataX, XMax, XMin)&lt;br /&gt;DataY = atol(arrY$(i))&lt;br /&gt;NewY = TransY(DataY, YMax, YMin)&lt;br /&gt;If Request$("Type") = "1" Then&lt;br /&gt;iff i&gt;0 then drawline(NewX,NewY,OldX,OldY,1,1)&lt;br /&gt;iff ShowData&gt;0 then textout(NewX,NewY,arrY$(i),0,63504, 5)&lt;br /&gt;drawrect(NewX,NewY,2,2,2,1,63488,0)&lt;br /&gt;ElseIf Request$("Type") = "2" Then&lt;br /&gt;iff showData&gt;0 then textout(NewX-5,NewY-20,arrY$(i),0,63504, 5)&lt;br /&gt;drawrect(NewX-5,NewY,10,YOrigin-NewY,2,1,1,255)&lt;br /&gt;End If &lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/single%20line.2.jpg"&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/single%20line.2.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;OldX = NewX&lt;br /&gt;OldY = NewY&lt;br /&gt;next&lt;br /&gt;Next&lt;br /&gt;Else&lt;br /&gt;for i = 0 to NoOfPoints - 1&lt;br /&gt;DataX = atol(arrX$(i))&lt;br /&gt;NewX = TransX(DataX, XMax, XMin)&lt;br /&gt;DataY = atol(arrY$(i))&lt;br /&gt;NewY = TransY(DataY, YMax, YMin)&lt;br /&gt;If Request$("Type") = "1" Then&lt;br /&gt;iff i&gt;0 then drawline(NewX,NewY,OldX,OldY,1,1)&lt;br /&gt;iff ShowData&gt;0 then textout(NewX,NewY,arrY$(i),0,63504, 5)&lt;br /&gt;drawrect(NewX,NewY,2,2,2,1,63488,0)&lt;br /&gt;ElseIf Request$("Type") = "2" Then&lt;br /&gt;iff showData&gt;0 then textout(NewX-5,NewY-20,arrY$(i),0,63504, 5)&lt;br /&gt;drawrect(NewX-5,NewY,10,YOrigin-NewY,2,1,1,255)&lt;br /&gt;End If&lt;br /&gt;OldX = NewX&lt;br /&gt;OldY = NewY&lt;br /&gt;next&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Plotting charts from dynamic data or from database shall be dealt in future articles. So expect a sequel.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p align="center"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.consigntech.com/downloads/34/samples/charts.zip"&gt;&lt;img src="http://photos1.blogger.com/blogger/3043/1836/320/GoDB_wing.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;charts.zip&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113393725327812555?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/12/plotting-charts-with-godb.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113384656833351059</guid><pubDate>Tue, 06 Dec 2005 05:16:00 +0000</pubDate><atom:updated>2005-12-05T21:22:49.086-08:00</atom:updated><title>Printing: support for USB printers</title><description>&lt;p&gt;GoDB has support for printing from serial printers.  But for Win32 platform, there may be a need print to common printers attached to PC. &lt;/p&gt;&lt;p&gt;Direct Printing is supported through serial ports. In case other printers are required, GoDB usually launch the printing application provided by the printer manufacturer with the temporary file contains the contents to be printed.&lt;/p&gt;&lt;p&gt;For ex: You can use HP's print application for Pocket PC to print a file using the OS_EXEC command.&lt;/p&gt;&lt;p&gt;Syntax: OS_EXEC("hpprint.exe data.txt")&lt;/p&gt;&lt;p&gt;Here data.txt is the data to be printed, created within GoDB as an external file &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113384656833351059?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/12/printing-support-for-usb-printers.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113351763323364841</guid><pubDate>Fri, 02 Dec 2005 09:12:00 +0000</pubDate><atom:updated>2005-12-02T02:07:08.676-08:00</atom:updated><title>Sample code for Activating trial applications.</title><description>&lt;p&gt;This sample application provides input on how to create Trial Versions of applications and their distribution &amp; activation mechanism for the developer community. The Sample application attached herewith gives an idea on how to Create Application ID, generate activation key and activation of the same by the user. It includes an Activation form where 'No. of Tries left' is shown along with a button (How To Activate), on click of which shows an 'Application ID'. &lt;/p&gt;&lt;p&gt;&lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/untitled.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/untitled.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;P.S. By default "no. of times left" shows 1000. This means the user can login upto 1000 times in the application. This no. can be defined by the Developer also. (Syntax: MaxAllowed=1000)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Steps to be Followed:&lt;/p&gt;&lt;p&gt;=====================&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/2.0.jpg"&gt;&lt;img style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://photos1.blogger.com/blogger/3043/1836/320/2.0.jpg" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;1) How to Activate - On click of this button by the user a message box pops up with the application id. The user would need to send the application ID to your predefined Email address (&lt;a href="mailto:Eg.info@xxxx.com"&gt;Eg.info@xxxx.com&lt;/a&gt;)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2) Use your custom logic to Generate an activation key and send the same to the user.( Refer sample code in samplekey.asp )&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3) The user enters the activation key and clicks on activate button.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://photos1.blogger.com/blogger/3043/1836/1600/3.0.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.consigntech.com/downloads/34/samples/ActivationKey.zip"&gt;&lt;img src="http://photos1.blogger.com/blogger/3043/1836/320/GoDB_wing.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br&gt;ActivationKey.zip&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113351763323364841?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/12/sample-code-for-activating-trial.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113333953429101616</guid><pubDate>Wed, 30 Nov 2005 08:19:00 +0000</pubDate><atom:updated>2005-11-30T00:32:14.736-08:00</atom:updated><title>Obtain IMEI number of your symbian phone from Your Go-DB application</title><description>&lt;p class="spip"&gt;by Ted Daniel -- Source: &lt;a href="http://www.newlc.com"&gt;www.newlc.com&lt;/a&gt;&lt;/p&gt;&lt;p class="spip"&gt;Go-DB supports loading external DLLs via simple GBasic APIs. Although most of the widgets neccessary for business application development are avaiable in Go-DB, you may in certain cases want to extend a particular platform for reasons best suited for your requirement be it for your application related needs or simply having fun. Find out how to use Go-DB to obtain IMEI number(&lt;a class="spip_out" href="http://www.webopedia.com/TERM/I/IMEI.html"&gt;International Mobile Equipment Identity&lt;/a&gt;) from your Go-DB application. In a later article, i will explain how to send SMS from your Go-DB application from a Sony Ericsson p910i phone.&lt;/p&gt;&lt;p class="spip"&gt;&lt;strong class="spip"&gt;A&lt;/strong&gt;ny cross platform application development at a particular point may need to extend a particular platform. Like any good cross platform development tool, Go-DB offers features which enable developers to fully extend a platform’s full capability. This article focuses on certain APIs in GBasic and how to use them to hook your DLL built using Symbian SDK.&lt;/p&gt;&lt;h3 class="spip"&gt;Step 1&lt;/h3&gt;&lt;p class="spip"&gt;You will need GStudio 3.4 &lt;em&gt;&lt;span style="color:#ffcc33;"&gt;(now a newer version 3.6 is available for download)&lt;/span&gt;&lt;/em&gt; final realease. Get a trial copy from &lt;a class="spip_out" href="http://www.go-db.com"&gt;http://www.go-db.com&lt;/a&gt;. You will also need Symbian module , which can be downloaded from the same location. &lt;em&gt;&lt;span style="color:#ffcc66;"&gt;(comes pre-installed with version 3.6. So no need to do this step)&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3 class="spip"&gt;Step 2&lt;/h3&gt;&lt;p class="spip"&gt;Download and install a Symbian SDK. For this particular example any SDK for Symbian OS version 6.0 and above is needed. I have used UIQ 2.1 SDK wincw version, downloadable from Sony Ericsson developer site(&lt;a class="spip_out" href="http://developer.sonyericsson.com"&gt;http://developer.sonyericsson.com&lt;/a&gt;)&lt;/p&gt;&lt;br /&gt;&lt;p class="spip"&gt;NOTE: You dont need to have Codewarrior to get this example working.&lt;/p&gt;&lt;h3 class="spip"&gt;Step 3&lt;/h3&gt;&lt;p class="spip"&gt;Download the sources for this tutorial, downloadable with this article. Download and unzip to your Symbian install drive.Open a command prompt window and issue these commands.&lt;/p&gt;&lt;br /&gt;&lt;p class="spip"&gt;&lt;i class="spip"&gt;bldmake bldfiles&lt;/i&gt;&lt;/p&gt;&lt;p class="spip"&gt;&lt;i class="spip"&gt;abld build armi urel&lt;/i&gt;&lt;/p&gt;&lt;p class="spip"&gt;This will buid the DLL. Pre-built SIS files are located in Group directory. SIS file installation will copy IMEIDLL.DLL to /system/libs directory on your device. Change the pkg file located in Group directory to suit your requirement.&lt;/p&gt;&lt;br /&gt;&lt;h3 class="spip"&gt;Step 4&lt;/h3&gt;&lt;p class="spip"&gt;Build the Go-DB project in release mode. Create a SIS file for your device and install it. Click on "Fetch IMEI" button and a message box will pop-up displaying your device’s IMEI number.&lt;/p&gt;&lt;p class="spip"&gt;The Source code is as Follows&lt;/p&gt;&lt;br /&gt;&lt;h3 class="spip"&gt;&lt;strong class="spip"&gt;Listing 1. Symbian cpp source code&lt;/strong&gt; &lt;/h3&gt;&lt;p class="spip"&gt;Our DLL exports one function whose definition is EXPORT_C long GetIMEICode(char *str); and the implementation is as follows&lt;/p&gt;&lt;p class="spip"&gt;&lt;tt&gt;&lt;tt&gt;&lt;div class="spip_code" dir="ltr" align="left"&gt;EXPORT_C long GetIMEICode(char *str)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;        int i= 0;&lt;br /&gt;&lt;br /&gt;        TBuf&amp;lt;256&amp;gt; Path;&lt;br /&gt;&lt;br /&gt;        TPlpVariantMachineId imei;&lt;br /&gt;&lt;br /&gt;        PlpVariant::GetMachineIdL(imei);&lt;br /&gt;&lt;br /&gt;        Path.Copy(imei);&lt;br /&gt;&lt;br /&gt;        for(i=0;i &amp;lt;  Path.Length();i++)&lt;br /&gt;&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;                str[i] = Path[i];&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        str[i] = '\0';&lt;br /&gt;&lt;br /&gt;        return 1;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/tt&gt;&lt;/tt&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="spip"&gt;Note that Go-DB understands "char *" only as parameters to functions.Converting to and from Symbian Descriptors is neccessary.After freezing the dll and building the project, note that a .DEF file will be created which will list the functions exported and theordinal associated with it.Our .DEF bundled with source shows the following.&lt;/p&gt;&lt;p class="spip"&gt;EXPORTS&lt;/p&gt;&lt;p class="spip"&gt;E32Dll__F10TDllReason @ 1 NONAME R3UNUSED ; E32Dll(TDllReason)&lt;/p&gt;&lt;p class="spip"&gt;GetIMEICode__FPc @ 2 NONAME R3UNUSED ; GetIMEICode(char *)&lt;/p&gt;&lt;p class="spip"&gt;We are not interested in E32Dll , just GetIMEICode. The ordinal as given to us is 2. This ordinal will be needed by our GBasic Code.&lt;/p&gt;&lt;p class="spip"&gt;Note: To freeze a dll after exports have been identified and defined properly, issue this command&lt;/p&gt;&lt;p class="spip"&gt;&lt;i class="spip"&gt;abld freeze armi&lt;/i&gt;&lt;/p&gt;&lt;h3 class="spip"&gt;&lt;strong class="spip"&gt;Listing 2. Go-DB source code&lt;/strong&gt; &lt;/h3&gt;&lt;p class="spip"&gt;&lt;tt&gt;&lt;tt&gt;&lt;div class="spip_code" dir="ltr" align="left"&gt;Sub IMEICTRL_Click&lt;br /&gt;&lt;br /&gt;        st1$="Initial String"&lt;br /&gt;&lt;br /&gt;        h = loadlib("\\system\\libs\\IMEIDLL.dll")&lt;br /&gt;&lt;br /&gt;        if h &amp;lt;&amp;gt; -1 then&lt;br /&gt;&lt;br /&gt;                ret = calllibfunc(h,"2",st1$)&lt;br /&gt;&lt;br /&gt;                msgbox("IMEI Code is " + st1$)&lt;br /&gt;&lt;br /&gt;                unloadlib(h)&lt;br /&gt;&lt;br /&gt;        else&lt;br /&gt;&lt;br /&gt;                msgbox("Failed loading IMEIDLL.DLL")&lt;br /&gt;&lt;br /&gt;        end if&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;/tt&gt;We load the IMEIDLL first using loadlib function, if the function gets loaded properly, then the handle it returns will not be -1. Once we obtain the handle , use the handle in calllibfunc to execute the exported function. As explained in Listing 1, use "2" as Function Name. After the function call, st1$ will hold the IMEI number.&lt;/div&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.newlc.com/IMG/zip/GoDB-IMEI.zip"&gt;&lt;img src="http://www.newlc.com/IMG/gif/GoDB_Icon_only.gif" /&gt;&lt;/a&gt;&lt;br /&gt;GoDB-IMEI.zip&lt;br /&gt;7.6 kb&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113333953429101616?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/obtain-imei-number-of-your-symbian.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113333404277766339</guid><pubDate>Wed, 30 Nov 2005 06:54:00 +0000</pubDate><atom:updated>2005-11-29T23:00:44.090-08:00</atom:updated><title>Ged Reference</title><description>&lt;p&gt;&lt;br /&gt;Ged is the tool used to import and export data between html pages and databases and&lt;br /&gt;GoDB's file system.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note: This is used by GStudio Internally.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Ged can be used for the following :&lt;br /&gt;&lt;br /&gt;      1) Import Html, Image , Database, Text, config and forms.&lt;br /&gt;&lt;br /&gt;      2) Export database and config files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;strong&gt;Notes :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;GoDB filesystems SHOULD be named as "bdb" and should be in the current working directory (of ged and simulator). All the following operations are executed on this file.&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;strong&gt;Usage : &lt;/strong&gt;&lt;span class="codestyle"&gt;GED [options] InFile [ext]&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;-a&lt;/strong&gt; Add Any File without translation. Used to add raw binary files.&lt;br /&gt;&lt;br /&gt;  &lt;strong&gt;Usage:&lt;/strong&gt; Ged -a xyz.txt&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;strong&gt;-h&lt;/strong&gt; Add Html files with tag translation.   Used to load html pages and forms.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Usage:&lt;/strong&gt;  Adding a Page -- Ged -h test.html .txt&lt;br /&gt;&lt;br /&gt;               Adding a form-- Ged -h test.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; Refer to -p option to set font height while translation.&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;strong&gt;-p&lt;/strong&gt; Sets the font height for translation. This should be combined with -h option.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Usage: &lt;/strong&gt;ged -p 12 -h test.htm&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; If this option is not provided then ged assumes a font height of 8.&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;strong&gt;-g&lt;/strong&gt; Translates image into GoDB Image file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Usage: &lt;/strong&gt;   ged -g [FileName] [Rle] [ColorDepth]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                   Rle - Determines the Compression&lt;br /&gt;&lt;br /&gt;                                      0 - Uncompressed.&lt;br /&gt;                                      1 - Compressed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                 ColorDepth -&lt;br /&gt;&lt;br /&gt;                                                0 - Monochrome&lt;br /&gt;&lt;br /&gt;                                   1 - Pallete based 256 color&lt;br /&gt;&lt;br /&gt;                                 2 - 64k Colors (RGB565 format).&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;strong&gt;-i&lt;/strong&gt; Will index the &lt;strong&gt;a&lt;/strong&gt; database table&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Usage: &lt;/strong&gt;ged -i [Tablename] [IndexFileName] [KeyField] [KeyLength_in_chars]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Ex: &lt;/strong&gt;   ged -i Comp Comp.idx CompID 12&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113333404277766339?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/ged-reference.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113326534060787098</guid><pubDate>Tue, 29 Nov 2005 11:39:00 +0000</pubDate><atom:updated>2005-11-29T22:11:49.720-08:00</atom:updated><title>GStudio Reference</title><description>&lt;p class="heading2"&gt;&lt;a name="StylesFonts"&gt;&lt;span style="color:#000000;"&gt;GStudio&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GStudio is the and Integrated development Environment to edit debug and simulate GoDB applications.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Menu Options.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;File Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;File Operations.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;Edit Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Editor Operations.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;Build Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Compile &lt;/strong&gt;: Compiles the current file.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Build&lt;/strong&gt; : Builds the project by compiling all the Modified Files.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Build All &lt;/strong&gt;: Builds all the Files in the project.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Clean&lt;/strong&gt;: Deletes all the intermediate files in the build folder including the database files.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Start Debug &lt;/strong&gt;: Launches the simulator and connotes to it for source level debugging. &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Run &lt;/strong&gt;: Launches the simulator in Run Mode.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Remove All Breakpoints&lt;/strong&gt;: Removes all the breakpoints in the open bas files.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Configurations&lt;/strong&gt;: Add or remove Platforms to the Forms Builder.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Publish&lt;/strong&gt;: Publishes the current project to GoDB Sync Server for Application Deployment.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Exclude Setup&lt;/strong&gt;: Launches a dialog that lets you exclude files for different platforms.Ex: In some cases you might have ifferent images for different platforms and youexclude the images from getting to all the platforms. Home_PPC.bin should get compiled only to PPC platforms, Home_PALM.bin should get compiled only to Palm platforms etc.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;Tools Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;AddPlatform To Project &lt;/strong&gt;: This option adds a new platform to the project. Platforms option allows the developer to have different form layouts for different Resolutions.This is similar to Build -&amp;gt;Configurations.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Unicode To UTF&lt;/strong&gt;: This option helps the developer to get UTF-8 Encoded strings from Unicode strings. elect the Language option from the Language tool bar in the OS and&lt;br /&gt;type it on the Uincode Edit box , the UTF text will appear in the UTF Text&lt;br /&gt;box.This can be copied and pasted into the property &lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;window.&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g101.png" /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Other Options&lt;/strong&gt; in this menu let you Publish the app and VM to devices create setups etc. &lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;View Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Clear Build Window&lt;/strong&gt;: Clears the Build Output Window. PPrint outputs to thiswindow during debug Sessions.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Clear Trace Marks :&lt;/strong&gt; Clears the Cyan marks in the left margin when you run your project in debug mode.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr style="LEFT: 10px; TOP: 747px"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Options -&amp;gt; Project&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g92.png" /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Project &lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;GVS:&lt;/strong&gt; When using the GoDB Sync server, GVS is the GODB Versioning system formulti user&lt;br /&gt;projects. Refer to Sync server manual for GVS configuration.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Options -&amp;gt; Source &amp; Design: &lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g93.png" /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Insert Comments&lt;/strong&gt; Options determines if the comments are automatically insertedwhen you press enter after entering a sub statement.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Enable Auto Completion &lt;/strong&gt;Options determines if the Auto Completion Popup&lt;br /&gt;ShowsUp. &lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Auto Intend &lt;/strong&gt;Options determines if Code intends automatically in the editor.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Use UTF8&lt;/strong&gt; This option if Unchecked will render characters above ASCII 127 as Extended ASCII Characters. This is required for projects that use scandinavian ASCII characters .&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Options -&amp;gt; Build&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img style="LEFT: 60px; TOP: 1589px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g94.png" /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Verbrose&lt;/strong&gt; option determines if the external tools output, like the compiler output etc are displayed in the build output window.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Publish Compiled Scripts&lt;/strong&gt; option publishes the compiled files to GoDB Sync server&lt;br /&gt;automaticallyafter compilation.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;BDB Custom Size&lt;/strong&gt; option lets you sepcify the Maximum size of the BDB. Default is 90 MB.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Command Line option&lt;/strong&gt; let you specify the Additional Command line parameters while Executing.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Ex: -a=100 -b=200 etc these will be available in GBasic as GetOsVar$("*CMDLINE")&lt;br /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Option -&amp;gt; Workspace&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g95.png" /&gt; &lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Gridspacing&lt;/strong&gt; Determines the guide grid in the form builder.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Render Images&lt;/strong&gt; Determines if the images are rendered in the form builder.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Auto Hide DesignTools&lt;/strong&gt; Determines if the Tool Box is automatically hidden when you switch to code view from the form builder.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Selection:&lt;/strong&gt; Determines if the selection rectangle selects Complete or partial Selections.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;img style="LEFT: 60px; TOP: 2822px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g96.png" border="1" /&gt;When the "Select items that are completely..."&lt;br /&gt;option is selected only the first control is selected.&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g97.png" border="1" /&gt;When&lt;br /&gt;the "Include Partial Items..." option is selected both the controls are&lt;br /&gt;selected.&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g98.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;Layout Menu&lt;/u&gt;&lt;/strong&gt;Form Layout Operations.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Set Tab Order&lt;/strong&gt; Let you set the focus order of the controls in the form.Select this option and click on the controls in the order you want the controlsand select Layout-&amp;gt;Set Taborder Option to go back to normal editing.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;strong&gt;Before &lt;/strong&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g99.png" border="1" /&gt; &lt;strong&gt;After &lt;img style="LEFT: 60px; TOP: 3744px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g100.png" border="1" /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Example:&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;Script Wizard Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Creates Scripts for the current form and fields.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;&lt;u&gt;Window Menu&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Manages open windows in the IDE.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Help Menu &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Help, Activation , Updates etc.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113326534060787098?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/gstudio-reference.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113326417594155416</guid><pubDate>Tue, 29 Nov 2005 11:34:00 +0000</pubDate><atom:updated>2005-11-29T21:40:56.280-08:00</atom:updated><title>How GoDB Works ?</title><description>&lt;p&gt;GoDB works by having runtimes (VM) for various platforms that isolate hardware specific issues from the application developer.&lt;br /&gt;&lt;br /&gt;For example GoDB provides a consistent way of rendering forms with edit boxes and buttons, display images on forms, store data in RDBMS as records etc on all platforms. GoDB VM takes care of determining the type of file system used (Ex Flash,FAT etc) and implements appropriate the read and write routines. Similarly GoDB VM takes care of determining the display solution and color depth and renders forms in color or monochrome accordingly.&lt;/p&gt;&lt;p&gt;&lt;b&gt;GoDB has the following components.&lt;/b&gt;&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Microbrowser to render Forms and Pages.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;RDBMS engine with ANSI SQL support.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;GBasic programming environment.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;File System Manager.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Display manager.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Pointer/Keyboard Manager&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Connectivity Manager.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Smart Sync Manager.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Memory Manager (Heap/Stack)&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;blockquote style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"&gt;&lt;p&gt;All these components were written in pure ANSI "C" so that it could be compiled on multiple platforms. These components form the GoDB runtime environment (VM).&lt;br /&gt;This enables the applications developed for GoDB on one platform say Win32 to run on the another platform say Palm without any change.&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p dir="ltr"&gt;&lt;b&gt;The following components are hosted in Windows.&lt;/b&gt; &lt;/p&gt;&lt;ol start="10"&gt;&lt;br /&gt;&lt;li&gt;GStudio - GoDB IDE with Integrated Source level Debugger.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;GoDB Compiler&lt;/li&gt;&lt;br /&gt;&lt;li&gt;GoDB platform simulators.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Platforms supported&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://go-db.com/GoDB_manual/GettingStarted_Html/GS_2.gif" /&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;GoDB VM&lt;/b&gt;&lt;/p&gt;&lt;p align="justify"&gt;GoDB VM is the runtime engine that renders the forms and executes the applications on the various platforms. GoDB VM reads the Forms, gBasic and image files from the GoDB file system that is generated by the GoDB IDE after successful compilation of the project. This file system contains all the files required by an application and is called the BDB. To deploy an application to other platforms this file is just copied to that platform.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;GoDB Build Process &lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://go-db.com/GoDB_manual/GettingStarted_Html/GS_3.gif" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;GoDB Architecture&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://go-db.com/GoDB_manual/GettingStarted_Html/GS_4.gif" width=400; height=400/&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113326417594155416?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/how-godb-works.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113326387601445862</guid><pubDate>Tue, 29 Nov 2005 11:26:00 +0000</pubDate><atom:updated>2005-11-29T21:44:05.123-08:00</atom:updated><title>Custom Keyboards (GoDb Enterprise Edition)</title><description>&lt;p class="heading2"&gt;When dealing with multi lingual fonts or devices that do not have keyboards, GoDB provides an&lt;br /&gt;extensible Multilingual Keyboard and GBasic API for managing the Keyboard.&lt;br /&gt;&lt;br /&gt;To create a Custom Keyboard you need to create an Image with the KeyMap.&lt;br /&gt;&lt;br /&gt;&lt;img style="LEFT: 60px; TOP: 1874px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g83.png" border="1" width=400;height=250 /&gt;&lt;br /&gt;&lt;br /&gt;You need to create XML Keyboard Map files that specify the Location of the keys and the ASCII code that has to be generated corresponding to the font you are using. The XML file should have the same name as that of the image file,  say you have T_Main.GIF the XML file should be called T_Main.xml.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;XML&lt;/strong&gt; is defined as&lt;br /&gt;&lt;br /&gt;&amp;lt;gkeymap &lt;strong&gt;keycount='10'&lt;/strong&gt;&amp;gt; &lt;/p&gt;&lt;p class="heading2"&gt;&amp;lt;key &lt;strong&gt;x='17'&lt;/strong&gt; &lt;strong&gt;y='0'&lt;/strong&gt; &lt;strong&gt;w='17' h='15'&lt;/strong&gt; &lt;span style="color:blue;"&gt;&lt;strong&gt;c='1' &lt;/strong&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;key &lt;strong&gt;x='28'&lt;/strong&gt; &lt;strong&gt;y='31'&lt;/strong&gt; &lt;strong&gt;w='17' h='15'&lt;/strong&gt; &lt;span style="color:olivedrab;"&gt;&lt;strong&gt;c='a' &lt;/strong&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;key &lt;strong&gt;x='212'&lt;/strong&gt; &lt;strong&gt;y='47'&lt;/strong&gt; &lt;strong&gt;w='26' h='15'&lt;/strong&gt; &lt;span style="color:red;"&gt;&lt;strong&gt;a='13' &lt;/strong&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;key x='0' y='47' w='34' h='17' &lt;span style="color:fuchsia;"&gt;&lt;strong&gt;i='T_shift_main'&lt;/strong&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/gkeymap&amp;gt;&lt;br /&gt;&lt;br /&gt;Where &lt;strong&gt;keycount&lt;/strong&gt; Specifies the Number of keys in the keyboard.&lt;br /&gt;&lt;strong&gt;x,y&lt;/strong&gt; Specifies the Coordinates of the Key.&lt;br /&gt;&lt;strong&gt;w,h&lt;/strong&gt; Specifies the Dimensions of the Key.&lt;br /&gt;Character Codes that need to be generated can be specified as &lt;strong&gt;c - &lt;/strong&gt;Character that needs to be&lt;br /&gt;generated for the key.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;a - ASCII / Unicode  &lt;/strong&gt;Code for the character that needs to be generated.&lt;br /&gt;Multiple Keyboards can also be liked with the &lt;strong&gt;i&lt;/strong&gt; attribute&lt;br /&gt;&lt;strong&gt;i -&lt;/strong&gt; This attribute can be used to load another keyboard when the user clicks on the specified&lt;br /&gt;region. In the example clicking on the Shift key will load the T_shift_main.bin and T_shift_main.xml.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g84.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;To Load the Keyboard you have to use the LoadKeyBoard Method.&lt;br /&gt;To Show the Keyboard you have to use the ShowKeyBoard Method.&lt;br /&gt;To Hide the Keyboard you have to use the HideKeyBoard Method.&lt;br /&gt;&lt;br /&gt;Compile and run the project &lt;/p&gt;&lt;p class="heading2"&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g85.png" border="1" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="heading2"&gt;In the simulator you can Display the keyboard using the F5 key. &lt;/p&gt;&lt;p class="heading2"&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g86.png" border="1" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="heading2"&gt;You can click on the Shift Key for the Alternate Keyboard. &lt;/p&gt;&lt;p class="heading2"&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g87.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113326387601445862?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/custom-keyboards-godb-enterprise.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113326348491409148</guid><pubDate>Tue, 29 Nov 2005 10:44:00 +0000</pubDate><atom:updated>2005-11-29T03:24:45.346-08:00</atom:updated><title>Importing Fonts</title><description>&lt;p class="heading2"&gt;&lt;br /&gt;Goto Tools -&amp;gt; Font Importer.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g88.png" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="heading2"&gt;Select the Font By Clicking the Select Font Button.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g89.png" /&gt;&lt;br /&gt;&lt;br /&gt;This should open up the Font selection dialog select the font and Hit OK. Next Select the The Font File Name to Export the font to (Say Font7.fnt)&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g90a.png" /&gt;&lt;/p&gt;&lt;p class="heading2"&gt;Next Select the Char Set. Select &lt;strong&gt;Basic Latin&lt;/strong&gt; and Click on the Add ("&amp;gt;") Button.&lt;/p&gt;&lt;p class="heading2"&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g90b.png" /&gt;&lt;br /&gt;&lt;br /&gt;Click on the &lt;strong&gt;Export Button.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This should create the Font file. Add the font file (F7.fnt) to the project. Add a text box to your form and change the Font attribute for the text box to 7 and save compile and run the project.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g91.png" border="1" /&gt; &lt;/p&gt;&lt;p class="heading2"&gt;GoDB supports Unicode fonts too. See Tutorial on using Unicode for Multilingual apps and font apps.&lt;br /&gt;&lt;br /&gt;Note: Font files are copyrighted and you should acquire necessary Licences to export and&lt;br /&gt;use them in your applications.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113326348491409148?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/importing-fonts.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113326159532103819</guid><pubDate>Tue, 29 Nov 2005 10:44:00 +0000</pubDate><atom:updated>2005-11-29T22:14:48.196-08:00</atom:updated><title>Styles Fonts and Icons</title><description>&lt;p class="heading2"&gt;GoDB's Microbrowser supports customization of all the widgets and color schemes using Style Files.&lt;br /&gt;&lt;br /&gt;Style files are standard text files with CSS extension that have the name of the colors to change and the new color value.&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;TXTFLD_FG_COL=31 'Foreground color &lt;/span&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;span class="codestyle"&gt;TXTFLD_BG_COL= 65520'Background color &lt;/span&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;span class="codestyle"&gt;TXTFLD_BORDER_COL=63519'Border color&lt;br /&gt;TXTFLD_SELTXT_COL= 63488 'Selected text color&lt;br /&gt;TXTFLD_SEL_COL= 65504 'Selected background color&lt;br /&gt;TXTFLD_SELBRDR_COL= 2016 'Selected border color&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above example shows how color scheme of a text box can be changed.&lt;br /&gt;&lt;br /&gt;The file name of the CSS file determines which form the style is applied to. For example if you name the CSS file as home.css then the styles apply only to Home.Frm.&lt;br /&gt;&lt;br /&gt;If the CSS file is named Global.CSS then the style applies to all the forms but can be overridden by specific CSS files (say home.css).&lt;br /&gt;&lt;br /&gt;Starting with GoDB 3.6 you can use HTML 24 it Color formats #FE00FF&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;Right click in the project explorer and select Add File. Enter Home.CSS in the open dialog. Open Home.css and enter the example css data.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g80.png" border="1" width=400; height=195 /&gt;&lt;br /&gt;&lt;br /&gt;Compile and Run the application.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g81.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;You can add global.css and copy the style contents and see that all the forms show the same style. Refer to styles section in the help for a complete list of style names.&lt;br /&gt;&lt;br /&gt;You can also load custom fonts into godb. These fonts can be English or regional fonts. You need to use GoDB Font Converter tool to convert any standard ttf file to a file that can be used in GoDB. GoDB supports up to 20 concurrent fonts. These are numbered from 0-19 , Fonts 3, 4 and 5 are preloaded into the GoDB VM. These can be overridden to change the standard fonts in godb. GoDB also supports right to left Arabic and Hebrew Fonts.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g82.png" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113326159532103819?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/styles-fonts-and-icons.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113325213370415450</guid><pubDate>Tue, 29 Nov 2005 05:05:00 +0000</pubDate><atom:updated>2005-11-29T00:15:34.003-08:00</atom:updated><title>Lessong 8: Advanced Topics -External Communication API.</title><description>&lt;p class="heading2"&gt;GoDB has support for communicating using sockets, Serial Ports etc. You can use the&lt;br /&gt;DevopenDevRead DevWrite and DevClose functions for this.&lt;br /&gt;&lt;br /&gt;Socket Communication.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Sockets&lt;/strong&gt;&lt;br /&gt;'DEVOPEN(0,IP,PORT)&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;st1$="Hello There\r\n"&lt;br /&gt;ret=DEVOPEN(0,"127.0.0.1","8080")&lt;br /&gt;ret = DEVWRITE(0,st1$,"")&lt;br /&gt;ret = DEVREAD(0,st1$,"")&lt;br /&gt;print st1$&lt;br /&gt;DevClose(0,"")&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DevRead and DevWrite use Binary Escaped Strings ie Nulls are escaped as /00 and / as /2f (Refer to Chapter on Binary Files).&lt;br /&gt;For Serial Ports and Serial Printers.'DEVOPEN(1,PortID,[Speed,FlowControl])&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;st1$="Hello There\r\n"ret=DEVOPEN(1,"COM1:","9600,0")&lt;br /&gt;ret = DEVWRITE(1,st1$,"")&lt;br /&gt;ret = DEVREAD(1,st1$,"")&lt;br /&gt;print st1$&lt;br /&gt;DevClose(1,"") &lt;/p&gt;&lt;/span&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;hr  style="font-size:78%;"&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="DrawingandPainting"&gt;&lt;span style="color:#000000;"&gt;Drawing and Painting&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB supports drawing and painting routines like DrawLine, FillRect etc. GoDB Repaints the screen when something major changes happen on the screen.&lt;br /&gt;An example is a Calc Box or LUT Showing up. As the screen gets repainted, all previous  drawing commands can get overwritten. To avoid this put all your drawing functions in &lt;strong&gt;Form_Paint&lt;/strong&gt; routine&lt;br /&gt;&lt;br /&gt;All drawing routines in &lt;strong&gt;Form_Paint&lt;/strong&gt; routine are called automatically when ever the screen gets repainted.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Sub Form_Paint&lt;br /&gt;' Add Handler Code Here fillrect(10,10,100,100,63488)&lt;br /&gt;fillrect(20,20,100,100,2016) fillrect(30,30,100,100,31)&lt;br /&gt;fillrect(40,40,100,100,2047)&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;GoDB has built in Double Buffering where all drawing and painting routines are drawn on to a local offscreen buffer and then transferred to the OnScreen Buffer.This avoid flickering.&lt;br /&gt;&lt;br /&gt;You can selectively paint a field in GoDB.This feature is useful in certain scenarios like for example if you want to paint a control inside a tight loop in GBasic.&lt;br /&gt;&lt;br /&gt;If you run the following code you will see only the last number shown in the Field.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub Button1_Click&lt;br /&gt;for i=1 to 100&lt;br /&gt;#text1=i sleep(10)&lt;br /&gt;next&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you run the following code you can see the numbers changing in the edit control.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Sub Button1_Click&lt;br /&gt;for i=1 to 100&lt;br /&gt;#text1=i&lt;br /&gt;&lt;strong&gt;#text1.paint(1)&lt;/strong&gt;&lt;br /&gt;sleep(10)&lt;br /&gt;next End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;From GBasic you can paint the screen using the &lt;strong&gt;Paint&lt;/strong&gt; method or refresh and repaint all the controls using the &lt;strong&gt;Update&lt;/strong&gt; method. &lt;br /&gt;&lt;br /&gt;&lt;hr  style="font-size:78%;"&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="signaturefields"&gt;&lt;span style="color:#000000;"&gt;Signature Fields&lt;/span&gt;&lt;/a&gt; (GoDb Enterprise Edition)&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB has a built in signature capture field. The signature capture fields uses the &lt;strong&gt;Value&lt;/strong&gt; attribute of thefield to create two bitmap files, the signature and the thumbnail of signature.When the form is rendered the thumbnail is displayed on the form and when the user clicks onthe signature capture field, the bitmap is displayed in the popup. If the disabled attribute is set to 1 then the popup is not displayed so the user cannot modify the signature.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;In a database application the Value attribute should be set to a unique key of the captured record.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Ex: #Sign1$="S_"+PrimKey$ This will create unique sig files that can be associated with a&lt;br /&gt;record.&lt;strong&gt;Sig2BMP&lt;/strong&gt; component can be used convert the .SIG file to a BMP File.&lt;span class="codestyle"&gt; &lt;/span&gt;&lt;/p&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;a name="Timers"&gt;&lt;span style="color:#000000;"&gt;Timers&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB has a built in timer for handing background tasks. The timer can be set with a time interval and an Event handler function.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;settimer(50,"TimerFunc")&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Sub TimerFunc&lt;br /&gt;#text1$=format$("time",Time())&lt;br /&gt;#text1.paint(1)&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="CallingExternalProcesses"&gt;&lt;span style="color:#000000;"&gt;Calling External Processes&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;You can launch an external process / EXE using the OS_EXEC command. You can Launch Print Applications, IR Transfer applications (IRSquirt in Pocket PC), File viewers Like ACROBAT reader, Internet explorer etc&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;ret = os_exec("F:/WINNT/NOTEPAD.EXE C:/temp/test.txt") &lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr size="1"&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="ExternalAPIDlls"&gt;&lt;span style="color:#000000;"&gt;External API Dlls&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB supports loading of DLLS and Loadable modules (.so files in Linux) for calling native platform functions. The DLLs can be loaded using the LoadLib Function.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;h=LoadLib("Test.dll")&lt;br /&gt;When the DLL is loaded The Init function on the DLL is called with the HWND Handle.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;//****************************************************&lt;br /&gt;__declspec(dllexport) long Init(HWND hWnd)&lt;br /&gt;{&lt;br /&gt;MessageBox(NULL,"Init","Hi",MB_OK);&lt;br /&gt;return 1;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can call the functions in the Dll using the CallLib Function. GoDB passes all the Parameters as character Pointers to the DLL.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;st1$="Hello There Param 1"&lt;br /&gt;st2$="Hello There Param 2"&lt;br /&gt;calllibfunc(h,"TestFunc0")&lt;br /&gt;calllibfunc(h,"TestFunc1",st1$)&lt;br /&gt;print st1$&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span class="codestyle"&gt;//****************************************************&lt;br /&gt;&lt;br /&gt;__declspec( dllexport ) long TestFunc0()&lt;br /&gt;{&lt;br /&gt;MessageBox(NULL,"Func0","Hi",MB_OK);&lt;br /&gt;return 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;__declspec( dllexport ) long TestFunc1(char *p1)&lt;br /&gt;{&lt;br /&gt;MessageBox(NULL,p1,"Hi",MB_OK);&lt;br /&gt;strcpy(p1,"Changed in DLL");&lt;br /&gt;return 1;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To Unload the dll call the UnloadLib Function.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;h = loadlib("gDllTest.dll")&lt;br /&gt;ret = unloadlib(h)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When the DLL is unloaded the Deinit Function is called.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;//*******************************************************************&lt;br /&gt;// DeInit function in the DLL&lt;br /&gt;//*******************************************************************&lt;br /&gt;&lt;br /&gt;__declspec(dllexport)&lt;br /&gt;long DeInit()&lt;br /&gt;{&lt;br /&gt;MessageBox(NULL,"DeInit","Hi",MB_OK);&lt;br /&gt;return 1;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr size="1"&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;Using ActiveX/COM &lt;a name="ExternalAPIDlls"&gt;&lt;span style="color:#000000;"&gt;Components&lt;/span&gt;&lt;/a&gt; in GoDB&lt;br /&gt;&lt;br /&gt;GoDB Allows you to instantiate and use ActiveX/COM Components in Win32 and WinCE Platforms.To use a Component you  need to add the GDO Control to your form First.This can be done at the design time by&lt;br /&gt;adding the control to a Form.&lt;img style="WIDTH: 79px; HEIGHT: 77px" height="77" alt="" hspace="0" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/GDO1.png" width="79" usemap="" border="1" /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/gdo2.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/gdo3.png" border="1" width=400; /&gt;&lt;br /&gt;Or or at runtime by using the Print Command.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;print "&amp;lt;gdo Name='GDO1' ProgID= 'WMPlayer.OCX.7' X='100' Y= '100' W='100'&lt;br /&gt;H= '100' &amp;gt;"&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;In GBasic you can call the methods on the objects as if they were standard Field Objects.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Sub Button1_Click #GDO1.URL$ = "c:\\temp\\1.mpg"&lt;br /&gt;End Sub &lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;The thing to note here is that All String Properties of the object should have a &lt;strong&gt;$&lt;/strong&gt; at the end.When distributing the Applications that have ActiveX components you need to distribute GDOBridge.dll in the GoDB Installation folder.&lt;br /&gt;&lt;/p&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="ExternalAPIDlls"&gt;&lt;span style="color:#000000;"&gt;GDO Dlls&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Only Win32 and WinCE support Com components natively. To create Native Dlls/SOs for other platforms thatCan support Introspection by the GoDB VM to expose the DLL as an object to GBasic you need to create the DLL that exposes the Standard GDO Introspection functions. For an example of a GDO DLL see GDODLL Template in the Dll Samples.&lt;br /&gt;&lt;/p&gt;&lt;p class="heading2"&gt;The VM Loads the DLL and calls these exported functions to identify the properties , methods, functions, Types and parameters supported by the DLL and exposes these to GBasic. GDO dlls can be Instantiated by using the GDO Control in the form. This can be done at the design time by adding the control and Setting the ProgID to the File Name of the Component Or or at runtime by using the Print Command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr  style="font-size:78%;"&gt;&lt;br /&gt;&lt;a name="MessageHookDlls"&gt;&lt;span style="color:#000000;"&gt;Message Hook Dlls&lt;/span&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB supports devices that have external Barcode Readers/ RFID Readers etc. To support these devices GoDB has the option of loading Message Hook dlls. Message Hook Dlls are standard dlls that have a predefined set of exported Functions.&lt;br /&gt;&lt;br /&gt;Message Hook DLLs should have the following exported functions.&lt;br /&gt;HookGetEventRange(void* hWnd,long *EvStart,long *EvEnd, void** ppData)&lt;br /&gt;HookOnEvent(MSG *msg)&lt;br /&gt;HookFree(void* pData)&lt;br /&gt;&lt;br /&gt;When GoDB Starts it looks for gHook.dll in the current directory. If Present GoDB loads the DLL and calls HookGetEventRange. The DLL should return the event range that GoDB should pump to the dll.&lt;br /&gt;&lt;br /&gt;When an event is received in the Message Queue that matches this range GoDB Calls&lt;br /&gt;the HookOnEvent(MSG *msg) with the Message Structure.&lt;br /&gt;&lt;br /&gt;The DLL can then decode the message and post appropriate translated Message. A typical Example is a Symbol Device that has a Barcode Scanner.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;THe GHook.dll Initialises the barcode scanner when it loads and registers with GoDB with the message ID range that is generated when the Scan Button is pressed.&lt;br /&gt;&lt;br /&gt;When the user presses the scan button the Message ID since is in the requested range is passed to the gHook.dll. gHook.dll then Uses the BarCode Reader API to read the barcode and posts WM_CHAR message to the HWnd sent by godb in the HookGetEventRange function.&lt;br /&gt;&lt;br /&gt;GoDB also has Encryption and Connection Manager Dlls. Refer to the External Processes &amp; DLLs section for more information. &lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;a name="serverpushfunction"&gt;&lt;span style="color:#000000;"&gt;Server&lt;/span&gt;&lt;/a&gt; Push Functions Using Sockets&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB has Functions that can Listen for messages from the server or from other GoDB Applications. To Use the Push Functionality you need to start the Message listener using the &lt;strong&gt;MSGLISTNER&lt;/strong&gt; function.&lt;br /&gt;&lt;br /&gt;Currently GoDB supports socket listener.  To start the Socket Listener,&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;MSGLISTENER("START_SOCK:9898")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where &lt;strong&gt;START_SOCK&lt;/strong&gt; is the command to start the socket listener in the future support for Bluetooth etc will be added, and 9898 is the Port Address where the socket will be listening. When a message is received the &lt;strong&gt;FORM_NOTIFY&lt;/strong&gt;   handler is called.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;To send a message to the Socket Listener use &lt;strong&gt;SendMessage&lt;/strong&gt; Function.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;SendMessage("Sock/127.0.0.1:9898","Hello There")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Send message also takes the parameters of the format &lt;strong&gt;[Type]/[Commands]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;For Sockets it is&lt;strong&gt;Sock/[IP address]:[Port]&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The second parameter is the message to be sent.&lt;br /&gt;&lt;br /&gt;Here we are sending a message to the same machine (127.0.0.1).&lt;br /&gt;&lt;br /&gt;To Get Notification you have to write a &lt;strong&gt;Form_Notify&lt;/strong&gt; handler. &lt;strong&gt;Form_Notify&lt;/strong&gt; handler receives all types of notifications from GoDB.The Function &lt;strong&gt;GetNotifySrc()&lt;/strong&gt; should be used to determine the source of the Notification. &lt;strong&gt;GetNotifySrc()&lt;/strong&gt; returns 1 for server messages.&lt;br /&gt;&lt;br /&gt;When the notification is received you can use &lt;strong&gt;GetMessage&lt;/strong&gt; Function to retrieve the message from the message queue. &lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;GetMessage&lt;/strong&gt; Takes 4 parameters, The First parameter returns the numeric Message ID that uniquely identifies the message.&lt;br /&gt;&lt;br /&gt;The Second Parameter is the message type which is a string variable that specifies the type and identification of the sender. For socket message this contains the sender IP address.&lt;br /&gt;&lt;br /&gt;The third parameter contains the message that was received.&lt;br /&gt;&lt;br /&gt;The fourth parameter contains the options for retrieving the message.&lt;br /&gt;&lt;br /&gt;Sample Code:&lt;br /&gt; &lt;span class="codestyle"&gt;&lt;br /&gt;&lt;br /&gt;'******************************************************&lt;br /&gt;' Form_Notify Is Called when a Notification Event is Received.&lt;br /&gt;'*******************************************************&lt;br /&gt;sub Form_Notify&lt;br /&gt;if GetNotifySrc()=1 then&lt;br /&gt;print "Server Notification Received"&lt;br /&gt;dimi a&lt;br /&gt;dims b$,c$&lt;br /&gt;for i=1 to 10&lt;br /&gt;if getmessage(a,b$,c$,"")=1 then&lt;br /&gt;print a;b$;c$&lt;br /&gt;else&lt;br /&gt;exitfor&lt;br /&gt;endif&lt;br /&gt;next&lt;br /&gt;update&lt;br /&gt;endif&lt;br /&gt;endsub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; For performance reasons a message can contain up to &lt;strong&gt;255 &lt;/strong&gt;characters.&lt;/p&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;a name="serverpushfunction"&gt;&lt;span style="color:#000000;"&gt;Server&lt;/span&gt;&lt;/a&gt; Push Using SMS (Short Message Service) in smartphones.&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;On Smartphones the &lt;strong&gt;MSGLISTNER&lt;/strong&gt; function can be used to setup a listener for SMS Incoming Messages.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span class="codestyle"&gt;MSGLISTENER("START_SMS")&lt;/span&gt; Starts the SMS Listener so when a SMS is received by the phone &lt;strong&gt;Form_Notify&lt;/strong&gt; is called with&lt;strong&gt;GetNotifySrc&lt;/strong&gt; Returning 4. The Form_Notify Event for SMS is &lt;/p&gt;&lt;span style="font-family:Courier;"&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;'*************************************************&lt;br /&gt;' Form_Notify Is Called when a Notification&lt;br /&gt;' Event is Received.&lt;br /&gt;'*************************************************&lt;br /&gt;sub Form_Notify&lt;br /&gt;if GetNotifySrc()=11 then&lt;br /&gt;print "SMS Notification Received"&lt;br /&gt;dimi a&lt;br /&gt;dims b$,c$&lt;br /&gt;for i=1 to 10&lt;br /&gt;if getmessage(a,b$,c$,"")=1 then&lt;br /&gt;print a;b$;c$&lt;br /&gt;else&lt;br /&gt;exitfor&lt;br /&gt;endif&lt;br /&gt;next&lt;br /&gt;update&lt;br /&gt;endif&lt;br /&gt;endsub&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;To Stop the SMS Listener &lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;MSGLISTENER("STOP_SMS")&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;To Send an SMS you can use the Send Message Function&lt;/strong&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span class="codestyle"&gt;SendMessage("sms/&lt;span style="color:blue;"&gt;&lt;strong&gt;+14250010001&lt;/strong&gt;&lt;/span&gt;","Hello There")&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;Note:&lt;/strong&gt; If some other built in program like Inbox is already listening for SMS,  you cannot start the SMS.You need to shut it down first and then start the SMS&lt;br /&gt;Listener.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113325213370415450?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/lessong-8-advanced-topics-external.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113317205824361055</guid><pubDate>Mon, 28 Nov 2005 09:47:00 +0000</pubDate><atom:updated>2005-11-28T02:28:57.106-08:00</atom:updated><title>Lesson 7: Syncronization API &amp; XML Parsing</title><description>&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;GoDB was designed to support occasionally connected and always connected applications.&lt;br /&gt;&lt;br /&gt;Occasionally connected applications are standard rich client applications which can synchronize data and applications to the GoDB Sync server.&lt;br /&gt;&lt;br /&gt;You can also create online applications using GoDB. There are two ways to create online applications in GoDB.&lt;br /&gt;&lt;br /&gt;Using Forms and using net API.&lt;br /&gt;&lt;br /&gt;&lt;a name="UsingForms"&gt;&lt;span style="color:#000000;"&gt;Using Forms&lt;/span&gt;&lt;/a&gt; &lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;NOTE: To Execute this sample you need a webserver.&lt;br /&gt;&lt;br /&gt;Open the form builder and add a few text boxes. Also add a Submit Button.&lt;br /&gt;&lt;br /&gt;Set the URL property of the Submit.box to /gtest/hello.asp.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g69.png" border="1" width=400; height=163 /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Open the config page and set the GatewayIP to the IP address of the webserver.&lt;br /&gt;&lt;br /&gt;You can do this at compile time by editing Config.ini or at run time by pulling up the config screen (F9 after login in) and changing the GateWay IP and saving. If you select the runtime approach when you rebuild the project you need to set the Gateway IP again.&lt;br /&gt;&lt;br /&gt;In the Webserver machine create a directory called gtest and create a page called Hello.asp&lt;br /&gt;in it and copy the following content.&lt;br /&gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;&lt;br /&gt;Response.Write Request.ServerVariables("QUERY_STRING") &amp; vbcrlf&lt;br /&gt;Response.Write "Text1 = " &amp;amp; Request("text1") &amp; vbcrlf&lt;br /&gt;Response.Write "Text1 = " &amp;amp; Request("text2") &amp; vbcrlf&lt;br /&gt;Response.Write "Text1 = " &amp;amp; Request("text3") &amp; vbcrlf&lt;br /&gt;Response.Write "&amp;lt;link Name='Link1' value='Go Home' URL='!home.frm'&amp;gt;&lt;link url="!home.frm" value="Go Home" name="Link1"&gt;" &amp; vbcrlf&lt;br /&gt;Response.Write "&amp;lt;link Name='Link2' value='Get More Info' URL='/gtest/Moreinfo.asp'&amp;gt;&lt;link url="!home.frm" value="Go Home" name="Link1"&gt;" &amp; vbcrlf&lt;br /&gt;%&amp;gt;&lt;br /&gt;&lt;br /&gt;Compile and Run the Project.&lt;br /&gt;&lt;br /&gt;&lt;img style="LEFT: 60px; TOP: 901px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g70.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Click on the Submit Button.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g71.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You should see the results from the server.&lt;br /&gt;&lt;br /&gt;If URL property of the submit button does not start with a / then the BasePath&lt;br /&gt;from the config file is used as the target url.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;For example if BasePath is GoDBSS and the URL Property of the Submit Box is gtest.asp then target URL would be &lt;a href="http://Server/GoDBSS/gtest.asp"&gt;http://Server/&lt;span style="color:#000000;"&gt;GoDBSS&lt;/span&gt;/gtest.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can also use the Link Control to link to internet pages.&lt;br /&gt;&lt;br /&gt;Add a link control to the Form and set the URL to /gtest/hello.asp. When you click on the link you will be taken to the page in the webserver.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g72.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g73.png" border="1" /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g74.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr  style="font-size:78%;"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;a name="NETAPI"&gt;&lt;span style="color:#000000;"&gt;NET API&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the previous section we saw how we can connect to a webserver to post values and link to internet pages.&lt;br /&gt;&lt;br /&gt;In this section we will see how we can do this from GBasic using net API. The remote site can be a standard website or a webservice.&lt;br /&gt;&lt;br /&gt;You can use the HTTPDNLD Api for downloading data from internet site to a local file.&lt;br /&gt;&lt;br /&gt;Result = HTTPDNLD(URL,POSTQUERY,FILENAME,ISEXTERNALFILE)&lt;br /&gt;&lt;br /&gt;Examples of usage.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;'Standard Download&lt;br /&gt;ret=HTTPDNLD("/gtest/hello.asp","text1=v1&amp;text2=v2","test.txt",0)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;UnLike the Submit button and the Link Control HttpDNLD can be used to download data from Fully Qualified URLs.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;ret=HTTPDNLD("http://www.consigntech.com/gTest/Hello.asp","Text1=v1&amp;amp;Text2=v2",&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span class="codestyle"&gt;"test.txt",0)&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Downloading Rows to a Table&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Result = HTTPDNLDTABLE(URL,POSTQUERY,TABLENAME)&lt;br /&gt;&lt;br /&gt;You can use the HTTPDNLDTable api to download a tab delimited file from a webserver and insert it into a local table. The table should exist on the client and the Column count in the downloaded file and the local table should be compatible.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;ret=HTTPDNLDTABLE("/gab/default.asp","search=A&amp;viewby=0","TestTable");&lt;br /&gt;&lt;br /&gt;print ret&lt;br /&gt;print DB_ERROR$()&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Note On Proxies.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In some cases you might have a proxy server in your network.If this is the case you need to get the Port of the proxy server and enter it in the "Port" box. Also enter the Proxy IP in the "ProxyIP" box and finally check "UseProxy".&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g75.png" border="1" /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;a name="XMLParser"&gt;&lt;span style="color:#000000;"&gt;XML Parser&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;HttpDnld can be used to download data from normal sites and webservice sites.&lt;br /&gt;&lt;br /&gt;When the file is downloaded from a webservice site the resultant file is usually a XML File. You can use the XML api in GoDB to parse the file and extract the information you require.&lt;br /&gt;&lt;br /&gt;Example: To reterive market quotes from&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.webservicex.net/RealTimeMarketData.asmx/Quote?Symbol=IBM"&gt;http://www.webservicex.net/RealTimeMarketData.asmx/Quote?Symbol=IBM&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Create a new form and add a few text box controls and name them Symbol, &lt;span class="t"&gt;&lt;span style="color:#990000;"&gt;DateTime,&lt;/span&gt;&lt;/span&gt;Price,Shares.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g76.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add a button and add the following code in the handler.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub Button1_Click&lt;br /&gt;&lt;br /&gt;' Add Handler Code Here&lt;br /&gt;&lt;br /&gt;url$="http://www.webservicex.net/RealTimeMarketData.asmx/Quote?Symbol="+#symbol$&lt;br /&gt;ret=httpdnld(Url$,"","quote.xml",0)&lt;br /&gt;h=XMLParseFile("quote.XML",0)&lt;br /&gt;&lt;/span&gt;&lt;span class="codestyle"&gt;ifh&amp;lt;&amp;gt;-1 then&lt;br /&gt;&amp;gt; ret=XMLGoToFirst(h)&lt;br /&gt;while XMLFetch(h,"")=1&lt;br /&gt;print xpath$(h) ; xvalue$(h)&lt;br /&gt;iff xpath$(h)="\\QuoteList\\QuoteLists\\Quote\\Price" then #Price$=xvalue$(h)&lt;br /&gt;iff xpath$(h)="\\QuoteList\\QuoteLists\\Quote\\MatchedShares" then #Shares$=xvalue$(h)&lt;br /&gt;iff xpath$(h)="\\QuoteList\\QuoteLists\\Quote\\DateTime" then #DateTime$=xvalue$(h)&lt;br /&gt;wend&lt;br /&gt;endif&lt;br /&gt;ret=XMLClose(h)&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Compile and Run the application and Click on the button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g77.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;a name="SyncAPI"&gt;&lt;span style="color:#000000;"&gt;Sync API&lt;/span&gt;&lt;/a&gt; (GoDB Enterprise Edition)&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB has a built in synchronization component to identify modified files, records and seamlessly synchronize them with the GoDB server. The developer doesn't have to write even a single line of code to synchronize files and tables. The developer just needs to map the&lt;br /&gt;files and tables through in the GoDB Sync server admin panel and they automatically get downloaded and updated when the user synchronizes.&lt;br /&gt;&lt;br /&gt;There are two ways the client can initiate synchronization. By Opening up the Menu and clicking on Sync.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g78.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Or by using the SYNC Api.&lt;br /&gt;&lt;br /&gt;Sync([FULLSYNC],[Sync Status Display Level])&lt;br /&gt;&lt;br /&gt;if FULLSYNC =0 then Incremental Sync is performed&lt;br /&gt;&lt;br /&gt;if FULLSYNC =1 then All the files tables are downloaded from the server and synced locally OVERWRITING all the data on the client.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;rem Delta Sync&lt;br /&gt;&lt;br /&gt;SYNC(0,3)&lt;br /&gt;&lt;br /&gt;rem FULL Sync&lt;br /&gt;&lt;br /&gt;SYNC(1,3)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Refer to GoDB Sync Server Manual for an overview of GoDB Synchronization.&lt;/b&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="HTTPFileUploading"&gt;&lt;span style="color:#000000;"&gt;HTTP File Uploading.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Just as the HTTPDNLD enables you to download files , you can use the HttpUPLD and HTTPUpldTable apis to upload client files to the server.&lt;br /&gt;&lt;br /&gt;Result = HTTPUPLD(URL,POSTQUERY,FILENAME,SERVERFILE,&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;RETURN_VARIABLE,IsExternalFile)&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;'Internal File&lt;br /&gt;&lt;br /&gt;dim a$(10000)&lt;br /&gt;&lt;br /&gt;print httpupld("http://default.asp","a=U","SMS.jpg","SMS.jpg",a$,0)&lt;br /&gt;&lt;br /&gt;print a$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;NOTE: The file is uploaded as a HTTP Upload (HTML &amp;lt;input type=file&amp;gt;) and you need appropriate component on the server to receive and store the file.&lt;br /&gt;&lt;br /&gt;You can upload a local table or results of a query to the server similarly using the HttpUpldTable Command.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Result = HTTPUPLDTABLE (URL,POSTQUERY,SQL,SERVERFILE,&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span class="codestyle"&gt;COLUMNSEPERATOR,&lt;/span&gt;&lt;span class="codestyle"&gt;RETURN_VARIABLE)&lt;br /&gt;&lt;br /&gt;dim a$(10000)&lt;br /&gt;&lt;br /&gt;print httpupldtable("http://Server/default.asp","a=U","select * from customer","table.txt","\t",a$)&lt;br /&gt;&lt;br /&gt;print a$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The return Variable holds the contents sent back from the server after upload.&lt;br /&gt;&lt;br /&gt;You can implement a complete Sync system using the HTTP Uploading/Downloading api, You can use FATTR function to identify modified files on the client, FCOPY, FDelete and OS_exec to do post sync installation and cleanup tasks.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113317205824361055?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/lesson-7-syncronization-api-xml.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113317051503198821</guid><pubDate>Mon, 28 Nov 2005 08:48:00 +0000</pubDate><atom:updated>2005-11-28T01:44:37.133-08:00</atom:updated><title>Lesson 6: Images, Custom Menus, Reading &amp; writing Files and Authentication</title><description>&lt;p class="heading2"&gt;&lt;a name="Images"&gt;&lt;span style="color:#000000;"&gt;Images&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB has an in-built Microbrowser which can render forms enabling you to develop rich UI applications with images.&lt;br /&gt;&lt;br /&gt;Here are some of the UIs that are possible.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g59.png" /&gt; &lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g60.png" /&gt;&lt;br /&gt;&lt;br /&gt;GoDB supports GIF,JPEG and BMP Images.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g61.png" border="1" /&gt; &lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g62.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Select the Images Tab In Project Explorer.&lt;br /&gt;&lt;br /&gt;Right Click on internal images and select Add File.&lt;br /&gt;&lt;br /&gt;In the Open dialog select the images.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g63.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Open Home.Frm, Switch to the Images Tab in the project explorer and drag drop the images into the form.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g64.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Reposition the Image fields.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g65.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Compile and Run the application.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g66.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;If you want to see the images rendered in the form builder after you drag and drop them, then click on Menu -&amp;gt; View-&amp;gt; Options. Select Workspace Tab and Check Render Images.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g67.png" /&gt;&lt;br /&gt;&lt;br /&gt;You should be able to see the rendered images in the form builder now.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g68a.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;When the project is compiled the images are converted to a BIN File (GoDB Bitmap Image format) and compiled into the BDB file.&lt;br /&gt;&lt;br /&gt;External Images: (Not Recommended for handheld platforms)You also have the option of having the images in an external images folder (Sub-directory&lt;br /&gt;below the BDB directory).&lt;br /&gt;&lt;br /&gt;If the platform supports rendering of PNG/JPG/GIF files they can also be placed in&lt;br /&gt;this folder.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr  style="font-size:78%;"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;a name="custommenus"&gt;&lt;span style="color:#000000;"&gt;Custom Menus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;GoDB Has a standard Built in menu. This menu can be brought up by pressing the F1 key or or by clicking at the bottom right corner.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu1.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;This menu can be changed by loading a custom menu using the strong&gt;LoadMenu&lt;/strong&gt; Command.&lt;br /&gt;&lt;br /&gt;You can use Hierarchal Menus in GoDB.&lt;br /&gt;&lt;br /&gt;To Specify a menu you need to form strings that represent each menu item as&lt;br /&gt;MenuID,ParentID,MenuText.&lt;br /&gt;&lt;br /&gt;For example a standard Menu would be.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;St$=""&lt;br /&gt;&lt;/span&gt;&lt;span class="codestyle"&gt;St$=St$+"10,0,Test1,"&lt;br /&gt;&lt;/span&gt;&lt;span class="codestyle"&gt;St$=St$+"11,0,Test2,"&lt;br /&gt;St$=St$+"12,0,Test3,"&lt;br /&gt;St$=St$+"13,0,Test4,"&lt;br /&gt;St$=St$+"14,0,Test5"&lt;br /&gt;LoadMenu(St$)&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The above code fragment creates the following single level menu&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu2.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;To Display the menu all Show Menu&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub HelloBtn_Click&lt;br /&gt;ShowMenu()&lt;br /&gt;print GetMenuID()&lt;br /&gt;End&lt;br /&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Two Level Menu.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;St$=""&lt;br /&gt;&lt;br /&gt;St$=St$+"10,0,Test1,"&lt;br /&gt;&lt;br /&gt;St$=St$+"11,0,Test2\x1E,"&lt;br /&gt;&lt;br /&gt;St$=St$+"12,0,Test3,"&lt;br /&gt;&lt;br /&gt;St$=St$+"13,0,Test4,"&lt;br /&gt;&lt;br /&gt;St$=St$+"14,0,Test5,"&lt;br /&gt;&lt;br /&gt;St$=St$+"15,11,Test21,"&lt;br /&gt;&lt;br /&gt;St$=St$+"16,11,Test22,"&lt;br /&gt;&lt;br /&gt;St$=St$+"17,11,Test23,"&lt;br /&gt;&lt;br /&gt;St$=St$+"18,11,Test24,"&lt;br /&gt;&lt;br /&gt;St$=St$+"19,11,Test25"&lt;br /&gt;&lt;br /&gt;LoadMenu(St$)&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The above code fragment creates a two level menu the first levels have MenuIDs 10-14 and second level menu have MenuIDs 15-19 and you can notice that the second level menu's parent id is 11. This is the Parent MenuID. The \x1E is the character icon for right arrow.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu3.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;When the user selects the second item, the menu will move the current item to the top and show the second level menu.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu4.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Three Level Menu.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;St$=""&lt;br /&gt;St$=St$+"10,0,Test1,"&lt;br /&gt;St$=St$+"11,0,Test2\x1E,"&lt;br /&gt;St$=St$+"12,0,Test3,"&lt;br /&gt;St$=St$+"13,0,Test4,"&lt;br /&gt;St$=St$+"14,0,Test5,"&lt;br /&gt;St$=St$+"15,11,Test21,"&lt;br /&gt;St$=St$+"16,11,Test22,"&lt;br /&gt;St$=St$+"17,11,Test23\x1E,"&lt;br /&gt;St$=St$+"18,11,Test24,"&lt;br /&gt;St$=St$+"19,11,Test25,"&lt;br /&gt;St$=St$+"20,17,Test231,"&lt;br /&gt;St$=St$+"21,17,Test232,"&lt;br /&gt;St$=St$+"22,17,Test233,"&lt;br /&gt;St$=St$+"23,17,Test234,"&lt;br /&gt;St$=St$+"24,17,Test235"&lt;br /&gt;LoadMenu(St$)&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu3.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu5.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/gmenu6.png" /&gt;&lt;br /&gt;&lt;br /&gt;You can press Left or Backspace to go up one level. The Menu Colors can be changed using style files Refer to Lesson 9 for more details. &lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;For applications that need to display the menu programmatically you can use ShowMenu function.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub HelloBtn_Click&lt;br /&gt;&lt;br /&gt;ShowMenu&lt;br /&gt;print GetMenuID()&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Showmenu command's first parameter determines if the selected item in the menu is restored or if the menu starts from the first level.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub HelloBtn_Click&lt;br /&gt;ShowMenu(1) ' Remember Menu Settings&lt;br /&gt;print GetMenuID()&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Showmenu command's second and third parameter determines position of the menu.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub HelloBtn_Click&lt;br /&gt;ShowMenu(0,10,10) ' Show the menu in the top left corner.&lt;br /&gt;print GetMenuID()&lt;br /&gt;End&lt;br /&gt;Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The Important thing to note is that, When a custom menu is loaded the&lt;br /&gt;Standard hotkeys like F1,F7,F9 are disabled.&lt;br /&gt;&lt;br /&gt;You can show the menuwhen F1 Key is pressed by handling the OnKeyPressed event.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;sub Form_keypress&lt;br /&gt;&lt;br /&gt;' If F1 Key is pressed set keyhandled to 2&lt;br /&gt;if getkey()=1 then&lt;br /&gt;showmenu()&lt;br /&gt;endif&lt;br /&gt;EndSub&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;a name="ReadingandWritingFiles"&gt;&lt;span style="color:#000000;"&gt;Reading and Writing Files&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB VM was also designed to support devices that do no have file systems. GoDB has its own internal filesystem to store and reterive Forms, Script and Image files. This filesystem is part of the BDB file which shows up as a single file in the native OS.&lt;br /&gt;&lt;br /&gt;The File API in GoDB can write to both internal files (into the BDB file - the GoDB File system) or external files (Native OS files).&lt;br /&gt;&lt;br /&gt;Files can be opened with the FOpen(Filename,Location,Type) API where the location parameter determines if the file is internal or external.&lt;br /&gt;&lt;br /&gt;The Type parameter determines if the file is opened for Reading(1), Writing(2) or Appending(3)&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;&lt;strong&gt;Reading From Files&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;'/*********************************************/&lt;br /&gt;&lt;br /&gt;'/* Read The strings in the file and print */&lt;br /&gt;&lt;br /&gt;'/*********************************************/&lt;br /&gt;&lt;br /&gt;h1=fopen("test1.txt",0,1)&lt;br /&gt;print "File Handle ",h1&lt;br /&gt;print "Size ",fsize(h1)&lt;br /&gt;while feof(h1)=0&lt;br /&gt;print FREAD$(h1)&lt;br /&gt;wend&lt;br /&gt;ret=fclose(h1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can Read from the file using FREAD$ function. This function reads the upto 1024 chars each time.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;'/*********************************************/&lt;br /&gt;&lt;br /&gt;'/* Read The strings in the file and print */&lt;br /&gt;&lt;br /&gt;'/*********************************************/&lt;br /&gt;&lt;br /&gt;h1=fopen("test1.txt",0,1)&lt;br /&gt;print "File Handle ",h1&lt;br /&gt;print "Size ",fsize(h1)&lt;br /&gt;while feof(h1)=0&lt;br /&gt;print FREADLN$(h1)&lt;br /&gt;wend&lt;br /&gt;ret=fclose(h1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To Read Lines you can use the FREADLN$ function.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Writing to Files&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;h1=fopen("test1.txt",0,2)&lt;br /&gt;b=FWRITE(h1,"test1")&lt;br /&gt;ret=fclose(h1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can write to the file using FWrite. This Function writes the contents of a string to a file.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;'/*****************************************/&lt;br /&gt;&lt;br /&gt;'/* Open and append some text to the file */&lt;br /&gt;&lt;br /&gt;'/*****************************************/&lt;br /&gt;&lt;br /&gt;h1=fopen("test1.txt",0,3)&lt;br /&gt;a=100&lt;br /&gt;a$="Test"&lt;br /&gt;FPRINT h1,"test1",a,a$&lt;br /&gt;ret=fclose(h1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can write to the file using FPrint. This commands writes a line to the file.&lt;br /&gt;This command is similar to print and write to the file instead of to the screen.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Binary Files.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;GoDB supports reading from and writing to binary files using the FREADBIN$ and FWRITEBIN functions.&lt;br /&gt;&lt;br /&gt;Binary files can have Null chars that GoDB strings can infer as termination characters.&lt;br /&gt;&lt;br /&gt;To Avoid this the FreadBin$ escapes the NULL characters in the File with a /00 and a / is escaped as /2f.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;'/*********************************************/&lt;br /&gt;&lt;br /&gt;'/* Read The strings in the file and print */&lt;br /&gt;&lt;br /&gt;'/*********************************************/&lt;br /&gt;&lt;br /&gt;h1=fopen("test1.txt",0,1)&lt;br /&gt;&lt;br /&gt;while feof(h1)=0&lt;br /&gt;print FREADBIN$(h1)&lt;br /&gt;wend&lt;br /&gt;ret=fclose(h1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;While writing the same rules of escaping applies.&lt;br /&gt;&lt;br /&gt;h1=fopen("test1.txt",0,3)&lt;br /&gt;b=FWRITEBIN(h1,"test/00Hello/2Fthere")&lt;br /&gt;ret=fclose(h1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In some cases where native multimedia apis expect pure binary data, you can use&lt;br /&gt;LoadBlobFile and SaveBlobFile functions.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;ret = LoadBlobFile("abc.wav",0,a$)&lt;br /&gt;LoadRet = LoadBlobFile("abc.wav",0,a$)&lt;br /&gt;saveRet = SaveBlobFile("abc.wav",0,a$,LoadRet)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These functions return the number of bytes that was read and should be stored because the String &lt;strong&gt;Len&lt;/strong&gt; Function cannot be used with the strings&lt;br /&gt;returned by these functions&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Copying Files &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;GoDB supports copying of files into and out of the BDB using the FCOPY function&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;FCOPY(SrcFile,SrcLoc,DestFile,DestLoc).&lt;br /&gt;&lt;br /&gt;To copy a file within the bdb use&lt;br /&gt;&lt;br /&gt;FCOPY("test1.txt",0,"test2.txt",0)&lt;br /&gt;&lt;br /&gt;To copy a file from within the bdb to the external file system use&lt;br /&gt;&lt;br /&gt;FCOPY("test1.txt",0,"test2.txt",1)&lt;br /&gt;&lt;br /&gt;To copy a file from the external file system to the bdb use&lt;br /&gt;&lt;br /&gt;FCOPY("test2.txt",1,"test3.txt",0)&lt;br /&gt;&lt;br /&gt;You can also copy files in the external file system using&lt;br /&gt;&lt;br /&gt;FCOPY("test2.txt",1,"test3.txt",1)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="Authentication"&gt;&lt;span style="color:#000000;"&gt;Authentication - Config.ini and Config.frm&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB was designed primarily for business applications that communicate with GoDB Sync server to source data for local tables, download the Frm,Bas and Bin files etc.&lt;br /&gt;&lt;br /&gt;For authentication purpose user has to log into the client application and use these credentials during sync process with GoDB Sync server. Information like the UserID,Password, Sync server IP address are held in CONFIG.INI configuration file.&lt;br /&gt;&lt;br /&gt;To set the configuration the Config.frm is used. To load the config form you can press F9 in the simulator platforms. On the device the configuration form can be&lt;br /&gt;loaded using the&lt;br /&gt;&lt;span class="codestyle"&gt;"?A" URL.&amp;lt;link Name="Link1" Url="?A" Value="Config"&amp;gt;&lt;br /&gt;&lt;br /&gt;OR From GBasic&lt;br /&gt;&lt;br /&gt;LoadURL("?A")&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g68.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;When this form is saved GoDB automatically stores the values in the form to the config.ini.&lt;br /&gt;&lt;br /&gt;The Config.ini has the following format.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;?A?&lt;strong&gt;UID=&lt;/strong&gt;g&amp;&lt;strong&gt;PWD=&lt;/strong&gt;&amp;amp;&lt;strong&gt;USRID=&lt;/strong&gt;0&amp;&lt;strong&gt;IP=&lt;/strong&gt;127.0.0.1&amp;amp;&lt;strong&gt;Port=&lt;/strong&gt;80&amp;&lt;/span&gt;&lt;span class="codestyle"&gt;&lt;strong&gt;BP=&lt;/strong&gt;GoDBSS&amp;amp;&lt;strong&gt;UP=&lt;/strong&gt;&amp;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span class="codestyle"&gt;&lt;strong&gt;PI=&lt;/strong&gt;192.168.0.123&amp;amp;&lt;strong&gt;HN=&lt;/strong&gt;&amp;amp;&lt;strong&gt;LOG=&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;When GoDB starts Logon.frm is loaded from the BDB if present. If not then the default logon page is displayed. The UserID and the Password entered by the user in the logon screen are compared with the ones in the Config.ini. If they match then the user is authenticated and automatically taken to Home.FRM.&lt;br /&gt;&lt;br /&gt;The Gateway IP is the ip address of the GoDB Sync server.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;a name="SkippingtheLogonPage"&gt;&lt;span style="color:#000000;"&gt;Skipping the Logon Page&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;In some cases you might want to skip the logon page this can be done by AUTHSUCCESS command.&lt;br /&gt;&lt;br /&gt;In logon.bas You can add&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;AUTHSUCCESS&lt;br /&gt;LOADURL("!home.frm")&lt;br /&gt;END&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Or you can add custom authentication / Startup screen in the Logon.FRM. When the user clicks on the button you can take the user to the home.frm.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Sub Button1_Click&lt;br /&gt;&lt;br /&gt;if CustomAuth()=1 then&lt;br /&gt;AUTHSUCCESS&lt;br /&gt;LOADURL("!home.frm")&lt;br /&gt;Endif&lt;br /&gt;EndSub&lt;br /&gt;&lt;/span&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Function CustomAuth&lt;br /&gt;CustomAuth=1&lt;br /&gt;End Function &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113317051503198821?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/lesson-6-images-custom-menus-reading.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113316752116441237</guid><pubDate>Mon, 28 Nov 2005 08:27:00 +0000</pubDate><atom:updated>2005-11-28T00:45:41.250-08:00</atom:updated><title>Lesson 5: Advanced Forms Programming</title><description>&lt;p class="heading2"&gt;Enumerating the Field Names &lt;p class="heading2"&gt;To reterive the column names and Column count in a recordset, you can use B_RSFLDCOUNT, DB_RSFLDNAME and DB_RSFLDVAL Functions.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;DB_RSFETCH(A,"select * from test",1)&lt;br /&gt;n=DB_RSFLDCOUNT(A)&lt;br /&gt;print " Fld Count ",n&lt;br /&gt;for i=0 to n-1&lt;br /&gt;print " Fld Names ";i;DB_RSFLDNAME$(A,i)&lt;br /&gt;next&lt;br /&gt;&lt;br /&gt;while DB_RSISEOF(A)=0&lt;br /&gt;&lt;br /&gt;for i=0 to n-1&lt;br /&gt;print &lt;strong&gt;DB_RSFLDVAL$(A,i);&lt;/strong&gt;&lt;br /&gt;next&lt;br /&gt;DB_RSMOVENEXT(A)&lt;br /&gt;wend&lt;br /&gt;DB_RSCLOSE(A)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;Advanced Forms Programming.&lt;/strong&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="FormFields"&gt;&lt;span style="color:#000000;"&gt;Form Fields&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;To ease programming, the fields in a page that have GBasic Script show up as Field Objects. Hence changing the value of the fields in a page can directly the field value. For example if a page contains a text field named USERID then in your gbasic script you can directly set the field value like this.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;#USERID$ =&lt;br /&gt;"test"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Notethat form fields are proceeded by a '#'. A $ should be preceded to assign string variables to Form Fields&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;Example:&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;#USERID$ =&lt;br /&gt;"Hello"&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To assign Numeric variables the $ sign should be omitted&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;#USERID=100&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NOTE: For all field variables use a # in front of the field name. To update the contents of the text field.&lt;br /&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="DynamicFormControls"&gt;&lt;span style="color:#000000;"&gt;Dynamic Form Controls&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;GoDB Forms are rendered by the Microbrowser at runtime by parsing the XML Form tags. All controls that are dropped in to a GoDB Form exist as simple XML tags. For Example a text control has the following XML Tag.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;&amp;lt;TEXT NAME='UID' VALUE='g' /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;As the forms are rendered at run time, you can create controls at run time by just printing the XML Form tags using the print statement.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Sub Button1_Click&lt;br /&gt;print "&amp;lt;text name='test1' value='g'&amp;gt;"&lt;br /&gt;print "&amp;lt;text name='test2' value='g'&amp;gt;"&lt;br /&gt;print "&amp;lt;text name='test3' value='g'&amp;gt;"End Sub&lt;br /&gt;From GoDB 3.6 you can also use CreateObject Command to create objects.&lt;br /&gt;&lt;a href="http://go-db.com/GoDB_manual/GBasic_Ref/Field%20Related%20Functions/CreateObject.html"&gt;CreateObject&lt;/a&gt;(&lt;strong&gt;ObjectType&lt;/strong&gt;,&lt;strong&gt;ObjectName&lt;/strong&gt;,&lt;strong&gt;Attrs&lt;/strong&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;span class="codestyle"&gt;Ex:CreateObject("Text","text1"," Value= 'g' ")&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr  style="font-size:78%;"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="FormFieldArrays"&gt;&lt;span style="color:#000000;"&gt;Form Field Arrays&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;Fields with same names can be accessed as Field Arrays using the '[' Operator.&lt;br /&gt;&lt;br /&gt;Ex.:&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Print #RAD1[0].checked&lt;br /&gt;Print #RAD1[1].checked&lt;br /&gt;Print #RAD1[2].checked&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;a name="EventsinFieldArrays"&gt;&lt;span style="color:#000000;"&gt;Events in Field Arrays&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;When Events are fired in the handler use &lt;strong&gt;Curfld$&lt;/strong&gt;() to get the Field name that generated the Event.&lt;br /&gt;EX: &lt;strong&gt;CurFld$&lt;/strong&gt; will return the Name of the Control with the index.&lt;br /&gt;For the first control it will be Button1&lt;br /&gt;For the second control it will be Button1[1]&lt;br /&gt;For the third control it will be Button1[2] &lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;a name="DereferencingFieldsObjects"&gt;&lt;span style="color:#000000;"&gt;Dereferencing Fields Objects&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;br /&gt;In some cases you might need to refer to a Field variable whose name is determined at runtime in such cases you can use the Field Variable Dereferencing operator {&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;' Variable Name in a string literal&lt;br /&gt;print #&lt;strong&gt;{&lt;/strong&gt;"NAME"&lt;strong&gt;}&lt;/strong&gt; $&lt;br /&gt;' Variable Name in a string variable&lt;br /&gt;b$="NAME"&lt;br /&gt;'As Numeric&lt;br /&gt;print #{b$}&lt;br /&gt;'As String&lt;br /&gt;print #{b$}$&lt;br /&gt;#{b$}$="Hello"&lt;br /&gt;'Accessing Field Properties&lt;br /&gt;print #{b$}.x'Assigning Field Properties&lt;br /&gt;#{b$}.y=100&lt;br /&gt;&lt;br /&gt;'Assigning Array Field&lt;br /&gt;b$="VAR[0]"&lt;br /&gt;#{b$}.y=100&lt;br /&gt;&lt;br /&gt;b$="Grid1" 'Calling Object Methods&lt;br /&gt;#{b$}.Addrow("Data1,Data2,Data3,Data4,Data5")&lt;br /&gt;' Getting the value of clicked field&lt;br /&gt;b$=CURFLD$()&lt;br /&gt;print #{b$}$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;a name="PassingParametersbetweenForms"&gt;&lt;span style="color:#000000;"&gt;Passing Parameters between Forms&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;In Some Cases you might want to pass parameters between forms. You can use global variables to achieve this. If&lt;br /&gt;the number of variables is small the you can pass variables in the page URL.&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;LOADURL("!page1.txt&amp;a=10&amp;amp;b=100")&lt;br /&gt;&amp;lt;linkurl="!page1.txt&amp;a=10&amp;amp;b=100"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In the preceding page the variables can be retereived using the &lt;strong&gt;REQUEST$&lt;/strong&gt; Function&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;' page1.basPRINT REQUEST$("a")&lt;br /&gt;PRINT REQUEST$("b") &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113316752116441237?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/lesson-5-advanced-forms-programming.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113316158540060007</guid><pubDate>Mon, 28 Nov 2005 07:06:00 +0000</pubDate><atom:updated>2005-11-27T23:06:25.476-08:00</atom:updated><title>Lesson 4 -- Database Programming using GoDB</title><description>&lt;p class="heading2"&gt;This is applicable only to GoDB Enterprise Edition.&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="ImportingData"&gt;&lt;span style="color:#000000;"&gt;Importing Data From External Database (MS Access) into your GoDB application Grid and LookupTables(LUTs)&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;GoDB has an embedded ANSI SQL RDBMS. You can create ,modify and query tables using standard SQL statements.&lt;br /&gt;&lt;br /&gt;In this chapter lets see how we can import a MS Access MDB file into a GoDB application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g28.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Select Tools-&gt;DataAccess -&gt; Import From MSAccess.&lt;br /&gt;&lt;br /&gt;This will prompt for the location of the MDB File.&lt;br /&gt;&lt;br /&gt;For the sample we have used an MDB file called gsales.mdb located in &lt;strong&gt;GoDB Install Directory&lt;/strong&gt;\palm\access.&lt;br /&gt;&lt;br /&gt;Enter the Full path C:\Program Files\GoDB\palm\access\gsales.mdb.&lt;br /&gt;&lt;br /&gt;This will import all the tables in the MDB file into GoDB. In GODB the RDBMS tables are stored in a .BDB.DB file. If you named your project &lt;strong&gt;gTest&lt;/strong&gt; then the forms and basic scripts are stored&lt;br /&gt;in &lt;strong&gt;gTest.bdb&lt;/strong&gt; and the RDBMS tables are stored in &lt;strong&gt;gTest.bdb.db &lt;/strong&gt;file. In Platforms that do not&lt;br /&gt;support external files like palm the &lt;strong&gt;gTest.bdb.db&lt;/strong&gt; file is created inside &lt;strong&gt;gTest.pdb&lt;/strong&gt; file along with &lt;strong&gt;gTest.bdb&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;To View the tables that were imported you can use the GoDB Query Manager.&lt;br /&gt;&lt;br /&gt;Select Tools-&gt;DataAccess -&gt;Query Manager.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g29.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here enter a sample query &lt;strong&gt;select * from City&lt;/strong&gt; and select Run.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g30.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;This should show the query results.&lt;br /&gt;&lt;br /&gt;Warning: If you select Build -&amp;gt; Clean in GStudio, the Database tables will also be deleted&lt;br /&gt;(the .bdb.db file is deleted). So you will have to import the tables again.&lt;br /&gt;&lt;br /&gt;Now that we have the tables lets see how we can use them.&lt;br /&gt;&lt;hr  style="font-size:78%;"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="EmbeddedGrid"&gt;&lt;span style="color:#000000;"&gt;Embedded Grid&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;In GStudio open home.frm add a embedded grid &lt;img style="LEFT: 344px; TOP: 1629px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/egrid.gif" border="1" /&gt; control.&lt;br /&gt;&lt;br /&gt;Embedded grid can be used to display tabular data. The columns are defined in the &lt;strong&gt;ColNames&lt;/strong&gt; attribute and to addrows you can use the AddRow Method.&lt;br /&gt;&lt;br /&gt;In home.bas add the following code.&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;#egrid1.ColNames$="Col1,Col2,Col3,Col4"&lt;br /&gt;#egrid1.addRow("r11,r12,r13,r14")&lt;br /&gt;#egrid1.addRow("r21,r22,r23,r24")&lt;br /&gt;#egrid1.addRow("r31,r32,r33,r34")&lt;br /&gt;END&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Compile and run.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g31.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sourcing Data for grid from a query. In Home.bas remove the previous code fragment and add&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;#egrid1.sql$="select * from city"&lt;br /&gt;end&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Compile and Run&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="LEFT: 10px; TOP: 2166px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g32.png" /&gt;&lt;br /&gt;&lt;br /&gt;You can see that the results of the query are now displayed in the grid. Alternatively you can also enter the query in the SQL Attribute in the Property list window.&lt;br /&gt;&lt;br /&gt;&lt;img style="WIDTH: 205px; HEIGHT: 98px" height="98" alt="" hspace="0" src="http://go-db.com/GoDB_manual/NewTutorials/images/g33.png" width="205" usemap="" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="FullScreenGrid"&gt;&lt;span style="color:#000000;"&gt;Full Screen Grid&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;Full screen grids are used to display query results and occupy the entire screen.&lt;br /&gt;For this insert a Full Screen Grid &lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/grid.gif" border="1" /&gt;Control. Change the &lt;strong&gt;Value&lt;/strong&gt; attribute to &lt;strong&gt;Results&lt;/strong&gt; and the &lt;strong&gt;SQL&lt;/strong&gt; attribute to &lt;strong&gt;"Select * from emp"&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Compile and Run&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g34.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Click on the control&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g35.png" /&gt;&lt;br /&gt;&lt;br /&gt;You can change the SQL attribute from GBasic for different reports.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;#grid1.sql$="select * from city" &lt;/span&gt;&lt;br /&gt;Full Screen grids can also be displayed from gBasic using the &lt;strong&gt;DB_ShowGrid&lt;/strong&gt;command &lt;span class="codestyle"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub Button1_Click&lt;br /&gt;&lt;br /&gt;DB_ShowGrid("select * from emp","Hello There","50,50,100")&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g36.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;a name="Lookuptables"&gt;&lt;span style="color:#000000;"&gt;Lookup Tables (LUTs)&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;This is one of the most useful and powerful Data controls in GoDB. LUTs are usually used for selecting items in master tables. LUTs require three primary attributes, the &lt;strong&gt;TableName&lt;/strong&gt;, &lt;strong&gt;IDField&lt;/strong&gt; which will be the field that will uniquely identify a row in the table, &lt;strong&gt;ShowField&lt;/strong&gt; The field that will be displayed to the user for filtering and selection.&lt;br /&gt;&lt;br /&gt;Into the Home.frm add a LUT &lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/lut.gif" /&gt; Control. Change the &lt;strong&gt;Value&lt;/strong&gt; Attribute to &lt;strong&gt;Select Emp&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Change the &lt;strong&gt;TableName&lt;/strong&gt; Attribute to &lt;strong&gt;Emp&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Change the &lt;strong&gt;IDField&lt;/strong&gt; Attribute to &lt;strong&gt;EmpID&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Change the &lt;strong&gt;ShowField&lt;/strong&gt; Attribute to &lt;strong&gt;EmpName&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g37.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compile and Run the Project&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g38.png" /&gt;&lt;br /&gt;&lt;br /&gt;Click on the Control&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g39.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Type &lt;strong&gt;A&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g40.png" /&gt;&lt;br /&gt;&lt;br /&gt;you can see that only the records starting with A are displayed. This is a very powerful feature when you are searching through few thousand records and you want to narrow down data as you type the first few characters.&lt;br /&gt;&lt;br /&gt;To Select the row you can double click on the row or select the row and hit ok.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g41.png" /&gt;&lt;br /&gt;&lt;br /&gt;When you print the value for the LUT control from gbasic you will get the IDField Value.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Sub Button1_Click&lt;br /&gt;&lt;br /&gt;print #lut1$&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="LutDataBinding"&gt;&lt;span style="color:#000000;"&gt;Lut Data Binding&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;br /&gt;Lut Field has the capability to populate other controls with the current record value. For example if we might want to display the EmpID and AutoFld columns in the table.&lt;br /&gt;&lt;br /&gt;For this add two Readonly controls to the form. Change the First Readonly control's&lt;br /&gt;&lt;strong&gt;LutBind&lt;/strong&gt; Attribute to &lt;strong&gt;Lut1&lt;/strong&gt; Change the First Readonly control's &lt;strong&gt;LutSrcField&lt;/strong&gt; Attribute to &lt;strong&gt;empID&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="LEFT: 10px; WIDTH: 182px; TOP: 4952px; HEIGHT: 104px" height="104" alt="" hspace="0" src="http://go-db.com/GoDB_manual/NewTutorials/images/g42.png" width="182" usemap="" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Change the Second Readonly control's &lt;strong&gt;LutBind&lt;/strong&gt; Attribute to &lt;strong&gt;Lut1. &lt;/strong&gt;Change the Second Readonly control's &lt;strong&gt;LutSrcField&lt;/strong&gt; Attribute to &lt;strong&gt;AutoFld&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g43.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Compile and Run the Project&lt;br /&gt;&lt;br /&gt;&lt;img style="LEFT: 10px; TOP: 5288px" alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g44.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Select the employee &lt;strong&gt;Balaji&lt;/strong&gt;. This will automatically populate the two Readonly controls.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://go-db.com/GoDB_manual/NewTutorials/images/g45.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="LutfromGBasic"&gt;&lt;span style="color:#000000;"&gt;Lut from GBasic&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;LUTs can be displayed from GBasic using &lt;strong&gt;DB_SHOWLUT&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Sub Button1_Click&lt;br /&gt;ret=DB_SHOWLUT("select EmpID,EmpName from emp where EmpName like '?%'")&lt;br /&gt;if ret=1 then&lt;br /&gt;print lutselected$()&lt;br /&gt;print lutselname$()&lt;br /&gt;endif&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;DB_SHOWLUT takes a SQL query as a parameter, this query should return two columns the first the IDField and the Second the ShowField. When the Lut is displayedand the ? is the SQL is replaced with the text the user enters. So if the user enters &lt;strong&gt;A&lt;/strong&gt; the sql that would executed will be &lt;strong&gt;select EmpID,EmpName from emp where EmpName like 'A%' &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DB_SHOWLUT&lt;/strong&gt; Function returns 1 if the user selected a valid value.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LutSelected$()&lt;/strong&gt; returns the Selected IDField.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LutSelName$()&lt;/strong&gt; returns the Selected ShowField.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;Database and Forms Programming.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;a name="GoDBDatabase"&gt;&lt;span style="color:#000000;"&gt;GoDB Database&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;GoDB has a built in RDBMS that lets you use standard SQL commands to create tables, query data etc.&lt;br /&gt;&lt;br /&gt;GBasic Supports two types of Database commands.&lt;br /&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;a name="DB_EXEC"&gt;&lt;span style="color:#000000;"&gt;DB_EXEC&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;This command is used for data manipulation . Please note that this command does not return RecordSets. This command can be used for Creating tables, inserting, deleting and updating records etc.&lt;br /&gt;&lt;br /&gt;EX:&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;db_exec("create table test(id int,name varchar(20))",0)&lt;br /&gt;&lt;br /&gt;db_exec("insert into test values (1,'test1')",0)&lt;br /&gt;&lt;br /&gt;db_exec("insert into test values (2,'test2')",0)&lt;br /&gt;&lt;br /&gt;db_exec("insert into test values (3,'test3')",0)&lt;br /&gt;&lt;br /&gt;db_exec("insert into test values (4,'test4')",0)&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;strong&gt;DB_RowsMod&lt;/strong&gt; function can be used to determine the number of rows a &lt;strong&gt;DB_Exec&lt;/strong&gt; statement affected.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;db_exec "update vtable set qty= 100 where price &amp;gt; 10",0&lt;br /&gt;&lt;br /&gt;print &lt;strong&gt;db_rowsmod()&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;a name="DB_RSFETCH"&gt;&lt;span style="color:#000000;"&gt;DB_RSFETCH&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;This command is used for Data Querying. This command returns a recordset that can be used to get the value for individual columns. This command is used with the SQL Select query statement.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;strong&gt;DB_RSFETCH(A,"select * from test",1)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;while DB_RSISEOF(A)=0&lt;br /&gt;print @A.id,@A.name$&lt;br /&gt;DB_RSMOVENEXT(A)&lt;br /&gt;wend&lt;br /&gt;&lt;br /&gt;DB_RSCLOSE(A)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You will notice the &lt;strong&gt;A&lt;/strong&gt; as the first parameter in the DB_RSFETCH command. This is will be used as the RecordSet Identifier.&lt;br /&gt;&lt;br /&gt;GoDB Supports up to 10 con-currently open RECORDSETs named A - J.&lt;br /&gt;&lt;br /&gt;Data in the Recordset can be Retrieved in two ways.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Direct Addressing&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;DB_RSFETCH(A,"select * from test",1)&lt;br /&gt;&lt;br /&gt;while DB_RSISEOF(A)=0&lt;br /&gt;print @A.id,@A.name$&lt;/strong&gt;&lt;br /&gt;DB_RSMOVENEXT(A)&lt;br /&gt;wend&lt;br /&gt;DB_RSCLOSE(A)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;InDirect Addressing.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;DB_RSFETCH(A,"select * from test",1)&lt;br /&gt;while DB_RSISEOF(A)=0&lt;br /&gt;&lt;strong&gt;print @A("id"),@A$("name")&lt;/strong&gt;&lt;br /&gt;DB_RSMOVENEXT(A)&lt;br /&gt;wend&lt;br /&gt;DB_RSCLOSE(A)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This format helps you use a string expression for the field name.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;F1$="ID"&lt;br /&gt;F2$="Name"&lt;br /&gt;&lt;strong&gt;print @A(F1$),@A$(F2$)&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113316158540060007?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/lesson-4-database-programming-using.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>6</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113292942135641920</guid><pubDate>Fri, 25 Nov 2005 14:36:00 +0000</pubDate><atom:updated>2005-11-27T22:39:00.013-08:00</atom:updated><title>Lesson 3: Form Controls &amp; Events</title><description>&lt;p class="heading2"&gt;&lt;a name="Multiplatform"&gt;&lt;span style="color:#000000;"&gt;Multiplatform Form Builder and Event Handlers&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;GStudio comes with a powerful Form builder that lets you design Forms visually. Forms in GoDB are text files with XML tags that correspond to different controls that GoDB Supports. When you add a text box to the Form a XML tag corresponding to a text box is created.&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;text value="012345678" name="USERNAME"&gt;&lt;br /&gt;GoDB Supports the following Controls.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A quick summary of the widgets&lt;/strong&gt; &lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;a name="StandardControls"&gt;&lt;span style="color:#000000;"&gt;Standard Controls&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;table style="FONT-SIZE: 10pt; FONT-FAMILY: arial" cellspacing="0" bordercolordark="#ffffff" cellpadding="0" bordercolorlight="#000000" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/label.gif" /&gt;&lt;/td&gt;&lt;td&gt;Label&lt;/td&gt;&lt;td&gt;Used to Display Labels.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/text.gif" /&gt;&lt;/td&gt;&lt;td&gt;Text&lt;/td&gt;&lt;td&gt;Edit Box for capturing Data From the user.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/password.gif" /&gt;&lt;/td&gt;&lt;td&gt;Password&lt;/td&gt;&lt;td&gt;Edit Box for capturing Password From the user.&lt;/td&gt;&lt;/tr&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/radio.gif" /&gt;&lt;/td&gt;&lt;td&gt;Radio&lt;/td&gt;&lt;td&gt;Radio Button. Controls with the same name are grouped.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/checkbox.gif" /&gt;&lt;/td&gt;&lt;td&gt;Check&lt;/td&gt;&lt;td&gt;Check Box.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/button.gif" /&gt;&lt;/td&gt;&lt;td&gt;Button&lt;/td&gt;&lt;td&gt;Standard Button &lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/image.gif" /&gt;&lt;/td&gt;&lt;td&gt;Image&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/frame.gif" /&gt;&lt;/td&gt;&lt;td&gt;Frame box&lt;/td&gt;&lt;td&gt;Used to group controls.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/link.gif" /&gt;&lt;/td&gt;&lt;td&gt;Link&lt;/td&gt;&lt;td&gt;Used to Navigate between pages. URL property determines the new page.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/readonly.gif" /&gt;&lt;/td&gt;&lt;td&gt;Read Only&lt;/td&gt;&lt;td&gt;Readonly box for displaying results etc.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/popup.gif" /&gt;&lt;/td&gt;&lt;td&gt;Popup Box&lt;/td&gt;&lt;td&gt;Popup to display help and alert Messages.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/script.gif" /&gt;&lt;/td&gt;&lt;td&gt;Script&lt;/td&gt;&lt;td&gt;To Associate a different Bas File to the form.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;span style="color:#000000;"&gt;UI Enhancement Controls&lt;/span&gt; &lt;table style="FONT-SIZE: 10pt; FONT-FAMILY: arial" cellspacing="0" bordercolordark="#ffffff" cellpadding="0" bordercolorlight="#000000" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://go-db.com/GoDB_manual/NewTutorials/images/divider.gif" /&gt;&lt;/td&gt;&lt;td&gt;Divider&lt;/td&gt;&lt;td&gt;To Display a Divider between controls&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/poly.gif" /&gt;&lt;/td&gt;&lt;td&gt;Poly Line&lt;/td&gt;&lt;td&gt;Special control to display polygons.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/title.gif" /&gt;&lt;/td&gt;&lt;td&gt;Title Text&lt;/td&gt;&lt;td&gt;To set the title for the form.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a name="DataRelated"&gt;&lt;span style="color:#000000;"&gt;Enterprise Controls&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;table style="FONT-SIZE: 10pt; FONT-FAMILY: arial" cellspacing="0" bordercolordark="#ffffff" cellpadding="0" bordercolorlight="#000000" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/multi.gif" /&gt;&lt;/td&gt;&lt;td&gt;MultiLine&lt;/td&gt;&lt;td&gt;Edit Box for capturing Multiline Data From the user.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/list.gif" /&gt;&lt;/td&gt;&lt;td&gt;List Box&lt;/td&gt;&lt;td&gt;DropDown List box.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a name="DataRelated"&gt;&lt;span style="color:#000000;"&gt;Data Related and Special Controls&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;table style="FONT-SIZE: 10pt; FONT-FAMILY: arial" cellspacing="0" bordercolordark="#ffffff" cellpadding="0" bordercolorlight="#000000" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/lut.gif" /&gt;&lt;/td&gt;&lt;td&gt;Look Up Table (LUT)&lt;/td&gt;&lt;td&gt;Used to Display a Popup to select master items&lt;br /&gt;like Products,Customers etc.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/egrid.gif" /&gt;&lt;/td&gt;&lt;td&gt;Embedded Grid&lt;/td&gt;&lt;td&gt;Grid that can be embedded in a form.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/calc.gif" /&gt;&lt;/td&gt;&lt;td&gt;Calculator Box&lt;/td&gt;&lt;td&gt;Popup calculator Control for entering numeric data and calculations.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/date.gif" /&gt;&lt;/td&gt;&lt;td&gt;Date&lt;/td&gt;&lt;td&gt;Popup Datebox Control to select date.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/sign.gif" /&gt;&lt;/td&gt;&lt;td&gt;Sign Box&lt;/td&gt;&lt;td&gt;Popup Sign box control to capture Signature.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/grid.gif" /&gt;&lt;/td&gt;&lt;td&gt;Grid&lt;/td&gt;&lt;td&gt;Full screen grid to display reports etc.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a name="FormSubmitControls"&gt;&lt;span style="color:#000000;"&gt;Form Submit Controls&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;table style="FONT-SIZE: 10pt; FONT-FAMILY: arial" cellspacing="0" bordercolordark="#ffffff" cellpadding="0" bordercolorlight="#000000" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/hidden.gif" /&gt;&lt;/td&gt;&lt;td&gt;Hidden&lt;/td&gt;&lt;td&gt;Hidden box for holding temporary values.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/submit.gif" /&gt;&lt;/td&gt;&lt;td&gt;Submit Button&lt;/td&gt;&lt;td&gt;To Submit the values of a form to an internet site or to another page.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/cancel.gif" /&gt;&lt;/td&gt;&lt;td&gt;Cancel Button&lt;/td&gt;&lt;td&gt;To Clear the values entered in a form.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a name="BuildingForms"&gt;&lt;span style="color:#000000;"&gt;Building Forms&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;This section will demonstrate the process of creating a form, dropping controls and creating event handlers.&lt;br /&gt;&lt;br /&gt;Step 1) Create a New project&lt;br /&gt;&lt;br /&gt;Step 2) Open Home.txt and select the "Welcome to GoDB" button and delete it.&lt;br /&gt;&lt;br /&gt;Step 3) Drop three label controls and Change their values to &lt;strong&gt;Enter Number 1&lt;/strong&gt; , &lt;strong&gt;Enter Number 2 and Result&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g14.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g15.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Step 4) Drop a Button Control, Drop three text controls and empty the value attributes for the text controls.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g16.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Step 5) Right click on the Calc Button -&amp;gt; Script Wizard -&amp;gt; On Click.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g17.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Alternatively for Click events you can just double Click on the control.&lt;br /&gt;&lt;br /&gt;This should open up home.bas with a empty event handler. &lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;span class="codestyle"&gt;Sub Button1_Click&lt;br /&gt;&lt;br /&gt;' Add Handler Code Here&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Add the following Code to the event handler&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Sub Button1_Click&lt;br /&gt;#text3=#text1+#text2&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Compile and run the application. Enter data in the text boxes and hit the button. The third editbox should show the sum of the numbers entered in the first two edit boxes.&lt;br /&gt;&lt;br /&gt;Certain issues remain with this app. First the edit boxes allow characters.&lt;br /&gt;&lt;br /&gt;Second the content in the result edit box can be modified. A common way to handle this is to make the edit boxes accept only numeric values and the result box readonly. Here is how this can be done.&lt;br /&gt;&lt;br /&gt;Select the text box and locate the validate property , click on the ... button and select the Numeric Check Box and hit ok. Repeat this for the second text box too.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g18.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Select the third text box and make Disabled attribute to Yes. Alternatively you can also use a Readonly box for the result.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g19.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="MultiplatformForms"&gt;&lt;span style="color:#000000;"&gt;Multiplatform Forms&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;The form builder in GoDB can be used to create Forms that have different layout in different platforms. The Master Form is common for all the platforms. To adjust the layout for a different platform just select the appropriate platform tab.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g20.png" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g21.png" /&gt;&lt;br /&gt;&lt;br /&gt;The blue guide line indicates the screen boundaries for the platform.&lt;br /&gt;&lt;br /&gt;Here we can see that the form has to be redesigned for palm.&lt;br /&gt;&lt;br /&gt;Simply reposition or change the attributes of the controls to suit your platform screen size.&lt;br /&gt;&lt;br /&gt;&lt;img height="250" alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g22.png" width="400" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;You can see that we have changed the X and Y positions in the Palm Form. This is indicated by the &lt;strong&gt;BOLD&lt;/strong&gt; font in the attribute names.&lt;br /&gt;&lt;br /&gt;If you want to remove any attribute you have to do it in the Master page.&lt;br /&gt;&lt;br /&gt;When the project is compiled based on the platform selected for compilation the attributes from the appropriate Form will be used.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g23.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;During the design process sometimes you might want to apply the value of a specific attribute to all the platforms.This can be done by selecting the attribute in the Property list window and clicking on the &lt;strong&gt;A&lt;/strong&gt; button.&lt;br /&gt;&lt;br /&gt;If you want to apply all the attributes in a specific control in a platform to all the platforms you can select the control and Right click &gt; Apply to all platforms.&lt;br /&gt;&lt;br /&gt;You can also restore the default settings for a control by selecting the control and Right click -&gt;Revert all to default.&lt;br /&gt;&lt;br /&gt;You can remove unwanted platforms by right clicking on the platform tab and selecting Remove Platform.&lt;br /&gt;&lt;br /&gt;&lt;img style="LEFT: 10px; TOP: 4649px" alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g24.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;You can add a new platform you can right clicking on the platform tab and selecting Add Platform.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g25.png" /&gt;&lt;br /&gt;&lt;br /&gt;In the popup just select the platforms you want to add or remove and hit OK.&lt;br /&gt;&lt;/p&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;a name="Debugging"&gt;&lt;span style="color:#000000;"&gt;Debugging&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;GStudio has a powerful built in debugger with break points, watch points etc. Lets see how a program can be debugged using GStudio.&lt;br /&gt;&lt;br /&gt;Copy the following code and paste it in home.bas&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;i=10&lt;br /&gt;j=20&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Sub Button1_Click&lt;br /&gt;dim lvar&lt;br /&gt;lvar=10&lt;br /&gt;#text3=#text1+#text2&lt;br /&gt;print i&lt;br /&gt;print lvar&lt;br /&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You can set a Breakpoint by clicking on the left margin or pressing F9 key.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g46.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Now Compile the project and click on Start Debug.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g47.png" /&gt;&lt;br /&gt;&lt;br /&gt;This will launch the simulator in debug mode. When you login you should be able to see the Program Trace, That is the Blue markers in the Left Margin.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g48.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;Now Click on the Button in the simulator.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g52.png" /&gt;&lt;br /&gt;&lt;br /&gt;This should stop the execution at the break point.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g49.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;You can see the variables and fields in the Watch Window.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g50.png" border="1" /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g51.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;When the Execution is suspended by a break point you can use the debug aids to Control the execution.&lt;br /&gt;&lt;br /&gt;Click on &lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g52.png" border="1" /&gt; to "Step Into" a Call Statement&lt;br /&gt;&lt;br /&gt;Click on &lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g53.png" border="1" /&gt; to "Step Over" a Call Statement&lt;br /&gt;&lt;br /&gt;Click on &lt;img style="LEFT: 290px; TOP: 7996px" alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g54.png" border="1" /&gt; to "Step out" of a Subroutine&lt;br /&gt;&lt;br /&gt;Click on &lt;img style="LEFT: 386px; TOP: 8043px" alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g55.png" border="1" /&gt; to execute till the current cursor position&lt;br /&gt;&lt;br /&gt;Click on &lt;img style="LEFT: 10px; TOP: 8232px" alt="" src="http://go-db/GoDB_manual/NewTutorials/images/g58.png" border="1" /&gt; to Continue Execution from the current break point&lt;br /&gt;&lt;br /&gt;Click on &lt;img style="WIDTH: 27px; HEIGHT: 26px" height="26" alt="" hspace="0" src="http://go-db/GoDB_manual/NewTutorials/images/g56.png" width="27" usemap="" border="1" /&gt; to Stop the Debug session&lt;br /&gt;&lt;br /&gt;Click on &lt;img style="LEFT: 298px; TOP: 8136px" alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g57.png" border="1" /&gt; to Restart the Debug Session&lt;br /&gt;&lt;br /&gt;To reset a breakpoint simply click on the red dot using your mouse or press F9 key.&lt;br /&gt;&lt;br /&gt;F&lt;a name="FormEvents"&gt;&lt;span style="color:#000000;"&gt;orm Events&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:85%;"&gt;The above examples demonstrated Events that Fields generate, similarly the forms also generate events that are common to all the controls like Mouse Celik etc.&lt;br /&gt;&lt;br /&gt;To Generate Form Event Handlers Right click on the form when no controls are selected.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g79.png" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Form_Load&lt;/strong&gt; Event is called when the form is loaded.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Form_Keypress&lt;/strong&gt; Event is called the user presses any key.&lt;br /&gt;GetKey() Function can be used to identify the key pressed. KeyHandled method determines if the events are bubbled to the next control or not.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Sub Form_KeyPress&lt;br /&gt;' Add Handler&lt;br /&gt;Code Here&lt;br /&gt;' keycode = GetKey()&lt;br /&gt;' KeyHandled(1)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;Form_MouseClick , Form_MouseUP and Form_MouseMove&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Events are generated for mouse events. GetX() and GetY() functions return the X,Y location of the mouse.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:85%;"&gt;MouseHandled method determines if the events are bubbled to the next control or not. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:85%;"&gt;For Example of a user clicked on a button&lt;br /&gt;&lt;/span&gt;Form_MouseClick is called first and if mouse is handled in this event handler you can choose not to process the Button_Click Event.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Sub Form_MouseClick&lt;br /&gt;' Add Handler Code Here&lt;br /&gt;' x&lt;br /&gt;= GetMouseX(0)&lt;br /&gt;' y = GetMouseY(0)&lt;br /&gt;' MouseHandled(1)&lt;br /&gt;End&lt;br /&gt;Sub&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;Form_Paint&lt;/strong&gt; Event is called when the Microbrowser is painted. All the drawing routines like DrawLine FillRect etc should be coded here.&lt;br /&gt;&lt;br /&gt;Starting with GoDB 3.6 &lt;b&gt;Form_RMouseClick&lt;/b&gt; and &lt;b&gt;Form_RMouseUp&lt;/b&gt; have been added to handle right mouse clicks on plaforms that support it.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;&lt;a name="FormNavigation"&gt;&lt;span style="color:#000000;"&gt;Form Navigation&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1px"&gt;GoDB uses a microbrowser for rendering forms.&lt;br /&gt;&lt;br /&gt;Add a new form to the project. Right click on project explorer and select &lt;strong&gt;Add Form&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g26.png" /&gt;&lt;br /&gt;&lt;br /&gt;In the open dialog enter the name &lt;strong&gt;Main&lt;/strong&gt;.&lt;br /&gt;Select Yes when prompted for creating a file.&lt;br /&gt;&lt;br /&gt;Double click on the Main.Frm in the project explorer add a few controls to the form and save.&lt;br /&gt;&lt;br /&gt;Now open Home.FRM and add a Link Control &lt;img src="http://www.go-db.com/GoDB_manual/NewTutorials/images/link.gif" /&gt;. Change the value attribute for this control to &lt;strong&gt;Load Main&lt;/strong&gt;. Change the URL attribute to &lt;strong&gt;!main.frm.&lt;br /&gt;&lt;br /&gt;In godb all references to local files should start with a !.&lt;br /&gt;&lt;br /&gt;&lt;img alt="" src="http://www.go-db.com/GoDB_manual/NewTutorials/images/g27.png" border="1" width=400 height=250 /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: When Changing primary properties use the Master page. Use the platform pages only for properties that differ from the Master. This is to avoid errors where you might change a property in PalmOS page and compile a Pocket PC project and wonder why the property change does not work.&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Alternatively you can just dragdrop a file from the project explorer on to the form and this will create a link control.&lt;br /&gt;&lt;br /&gt;Compile and run the project&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113292942135641920?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/lesson-3-form-controls-events.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113283610813485677</guid><pubDate>Thu, 24 Nov 2005 12:41:00 +0000</pubDate><atom:updated>2005-11-24T23:06:50.183-08:00</atom:updated><title>Conditional Statements</title><description>&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB Supports Block IF and Single line IFF statements.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;if&lt;/strong&gt;&lt;em&gt;Condition&lt;/em&gt;&lt;strong&gt;then&lt;/strong&gt;&lt;br /&gt;Statements&lt;br /&gt;Statements&lt;br /&gt;&lt;strong&gt;else&lt;/strong&gt;&lt;br /&gt;Statements&lt;br /&gt;Statements&lt;br /&gt;&lt;strong&gt;endifEx:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;if a &gt;120 then&lt;br /&gt;print "a is greater than 120"&lt;br /&gt;else&lt;br /&gt;print "a is less than or equal to 120"&lt;br /&gt;endif&lt;br /&gt;print "Program Continuing"&lt;br /&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;iff&lt;/strong&gt; condition &lt;strong&gt;then&lt;/strong&gt; Statement1&lt;strong&gt;:&lt;/strong&gt;Statements2&lt;br /&gt;The &lt;strong&gt;:&lt;/strong&gt; operator can be used for separating statements in a single line.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Ex:&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;iff a &gt; 120 then print "a is greater than 120": goto&lt;br /&gt;&lt;strong&gt;!ProceedNext&lt;/strong&gt;&lt;br /&gt;print "a is less than or equal to 120"&lt;strong&gt;!ProceedNext&lt;/strong&gt;&lt;br /&gt;print "Program Continuing"&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Note: GoDB Labels start with a !.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;a name="Loops"&gt;&lt;span style="color:#000000;"&gt;Loops&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;br /&gt;GoDB supports two types of Loops the For next and While Wend.Loops can be aborted by a &lt;strong&gt;Break&lt;/strong&gt; Statement.The control can be transfered to the loop&lt;br /&gt;begining using a &lt;strong&gt;Continue&lt;/strong&gt; statement.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For&lt;/strong&gt; Variable &lt;strong&gt;=&lt;/strong&gt; Start &lt;strong&gt;to&lt;/strong&gt; End [&lt;strong&gt;Step&lt;/strong&gt; Increment]&lt;br /&gt;iff condition then &lt;strong&gt;Break&lt;/strong&gt;&lt;br /&gt;iff condition then &lt;strong&gt;continue&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Next&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Ex:&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;for i =1 to 100&lt;br /&gt;print i&lt;br /&gt;next&lt;br /&gt;for i =1 to 100 step 10&lt;br /&gt;iff i &gt; 50 then break&lt;br /&gt;print i&lt;br /&gt;next&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="WhileCondition"&gt;&lt;span style="color:#000000;"&gt;While Condition&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;br /&gt;&lt;strong&gt;While&lt;/strong&gt; &lt;em&gt;Condition&lt;/em&gt;iff condition then &lt;strong&gt;break &lt;/strong&gt;iff condition then &lt;strong&gt;continue&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Wend&lt;/strong&gt; &lt;/p&gt;&lt;p class="heading2"&gt;&lt;strong&gt;Ex:&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;i=0&lt;br /&gt;While i &lt; i="i+1" i="0"&gt; 5 then break&lt;br /&gt;i=i+1&lt;br /&gt;wend&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;hr  style="font-size:78%;"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;br /&gt;&lt;a name="Subroutinesandfunctions"&gt;&lt;span style="color:#000000;"&gt;Subroutines and Functions&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="heading2"&gt;GoDB allows creating modular applications using subroutines and functions. Subroutines are blocks of code that do not return values. Functions are blocks of code that return values.&lt;br /&gt;&lt;strong&gt;Subroutines are defined as. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;SUB&lt;/strong&gt; &lt;em&gt;SubroutineName&lt;/em&gt;(Parameters)&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;iff condition then &lt;strong&gt;return&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;EndSub&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;span class="codestyle"&gt;To call a subroutine you have to use the &lt;strong&gt;CALL&lt;/strong&gt; statement.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;span class="codestyle"&gt;&lt;strong&gt;Ex:&lt;/strong&gt;&lt;br /&gt;Call test1&lt;br /&gt;End&lt;br /&gt;sub Test1&lt;br /&gt;print "Inside Test "&lt;br /&gt;endsub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Ex Sub with parameters:&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Call test1(1,"test")&lt;br /&gt;End&lt;br /&gt;sub Test1(a,b$)&lt;br /&gt;print "Inside Test with numeric and string parameter";a;b$&lt;br /&gt;endsub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: &lt;/strong&gt;You should not jump out of a sub using a strong&gt;goto&lt;/strong&gt; statement.&lt;br /&gt;Use &lt;strong&gt;Return&lt;/strong&gt; statement if you want to exit a subroutine. In GoDB when strings are passed to a sub or function,they are passed &lt;strong&gt;by reference &lt;/strong&gt;. String literals , String expressions , Numeric variables and Numeric Expressions are passed &lt;strong&gt;by value&lt;/strong&gt;.All arrays variables are passed &lt;strong&gt;by reference&lt;/strong&gt;.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;c$="test"&lt;br /&gt;d=100&lt;br /&gt;Call test1(d,c$)&lt;br /&gt;print "after Test1 ";d;c$&lt;br /&gt;End&lt;br /&gt;sub Test1(a,b$)&lt;br /&gt;print "Inside Test1 ";a;b$&lt;br /&gt;b$="Welcome to GoDB "&lt;br /&gt;a=120&lt;br /&gt;endsub ' Passing Array dim&lt;br /&gt;a(10)a(0)=10call test2(a)print "After ";a(0)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Endsub Test2(b)print "Before" ;&lt;br /&gt;b(0)b(0)=20&lt;br /&gt;endsub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;a name="Recursion"&gt;&lt;span style="color:#000000;"&gt;Recursion&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB supports &lt;strong&gt;recursion only in Subroutines&lt;/strong&gt; and not in functions.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Call recsub(1)&lt;br /&gt;End&lt;br /&gt;sub recsub(a)&lt;br /&gt;iff a &amp;gt;10 then return&lt;br /&gt;print a&lt;br /&gt;call recsub(a+1)&lt;br /&gt;endsub&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr style="FONT-SIZE: 78%"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="Functions"&gt;&lt;span style="color:#000000;"&gt;Functions&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;strong&gt;Functions&lt;/strong&gt; are defined as&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Function&lt;/strong&gt; &lt;em&gt;FunctionName&lt;/em&gt;(Parameters)&lt;br /&gt;iff condition then &lt;strong&gt;return&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;FunctionName = ReturnValue&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;Endfunction&lt;/strong&gt;&lt;br /&gt;Functions are called by using them in an expression.&lt;br /&gt;&lt;strong&gt;Ex:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;t=TestFunc()&lt;br /&gt;print t&lt;br /&gt;End&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;function TestFunc&lt;br /&gt;print "inside&lt;br /&gt;TestFunc"&lt;br /&gt;&lt;strong&gt;TestFunc=10&lt;/strong&gt;&lt;br /&gt;endfunction&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Ex: With parameters&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;print TestFunc(1,"test")&lt;br /&gt;End&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;function TestFunc(a,b$)&lt;br /&gt;print "inside TestFunc ";a;b$&lt;br /&gt;TestFunc=a+100&lt;br /&gt;endfunction&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Ex: String Functions&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;print TestFunc$(1,"test")&lt;br /&gt;End&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;function TestFunc$(a,b$)&lt;br /&gt;print "inside TestFunc ";a;b$&lt;br /&gt;TestFunc$ = b$ +" added in func "&lt;br /&gt;endfunction&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Ex: String Functions Passed ByRef&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;c$="test"&lt;br /&gt;print TestFunc$(1,c$)&lt;br /&gt;print c$&lt;br /&gt;End&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;function TestFunc$(a,b$)&lt;br /&gt;print "inside TestFunc ";a;b$&lt;br /&gt;TestFunc$ = b$ +" added in func "&lt;br /&gt;b$="Modified in TestFunc"&lt;br /&gt;endfunction&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Note: Recursion is not supported in functions.&lt;/strong&gt;&lt;br /&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="heading2"&gt;&lt;a name="DimensioningandArrays"&gt;&lt;span style="color:#000000;"&gt;Dimensioning and Arrays&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB Supports creation of Numeric or string arrays using the &lt;strong&gt;DIM&lt;/strong&gt;&lt;br /&gt;statement.DIMI - Integer VariablesDIMF - Floating&lt;br /&gt;Point VariablesDIMS - String Variables&lt;br /&gt;&lt;strong&gt;Numeric Array&lt;/strong&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;&lt;strong&gt;DimI&lt;/strong&gt; a(100)&lt;br /&gt;for i=0 to 99&lt;br /&gt;a(i)=i&lt;br /&gt;next&lt;br /&gt;for i=0 to 99&lt;br /&gt;print a(i)&lt;br /&gt;next&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Note: GoDB arrays are 0 based so when you declare an array of 100 elements the elements start from 0-99.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Multidimensional Numeric Array&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;&lt;strong&gt;DimI &lt;/strong&gt;a(100,10)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;GoDB Supports up to Four Dimensions for Numeric Arrays. Only single dimensional String arrays are supported.&lt;strong&gt;DimS&lt;/strong&gt; can be used to define Strings and&lt;br /&gt;String Arrays.&lt;br /&gt;Ex:&lt;strong&gt;DimS&lt;/strong&gt; a$ ' Single String&lt;br /&gt;&lt;strong&gt;DimS&lt;/strong&gt; b$(10) ' Array of 10&lt;br /&gt;Strings.&lt;strong&gt;DimS&lt;/strong&gt; b$(10,5) ' 2-D Array Strings.&lt;br /&gt;&lt;br /&gt;One interesting thing about GoDB strings is that they can be accessed as an array of chars. You can also use the Mid$ function to get substrings.&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;a$="testing 123 "&lt;br /&gt;for i=0 to len(a$)-1&lt;br /&gt;print a$(i)&lt;br /&gt;next&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;GoDB Strings are internally stored as Null terminated character strings. You need to consider this while setting characters at different positions. This will work&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;a$="123"&lt;br /&gt;a$(0)="A"&lt;br /&gt;print a$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This will not work because there is a null char at a(3) so the print statement will print only till a(3)&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;a$="123"&lt;br /&gt;a$(4)="A"&lt;br /&gt;print a$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This will work.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;a$="123"&lt;br /&gt;a$(3)="A"&lt;br /&gt;a$(4)="\x00"&lt;br /&gt;print a$&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;Dim&lt;/strong&gt; can be used to define String&lt;br /&gt;with explicit sizes.&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;span class="codestyle"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;"&gt;Ex: String of size 10000&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Dim a$(10000)&lt;br /&gt;a$="testing 123 "&lt;br /&gt;print a$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;Ex: Array of 10 Strings with 100 chars&lt;/strong&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;Dim a$(10,100)&lt;br /&gt;for i=0 to 9&lt;br /&gt;a$(i)="Hello there " + i&lt;br /&gt;next&lt;br /&gt;for i=0 to 9&lt;br /&gt;print a$(i)&lt;br /&gt;next&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Array of strings can also be used like a two dimensional array of characters.&lt;br /&gt;&lt;span class="codestyle"&gt;&lt;br /&gt;print a$(0,0)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Will print the first character in the first string.Multi dimensional strings (upto 3D) can be declared using the Dim &lt;strong&gt;Ex: 2D Array of 10x10 Strings with 100 chars&lt;/strong&gt;&lt;span class="codestyle"&gt;Dim a$(10,10,100). &lt;/span&gt;You Can use &lt;strong&gt;Redim&lt;/strong&gt; to resize numeric arrays and &lt;strong&gt;StrExpand&lt;/strong&gt; to resize Strings.&lt;strong&gt; &lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;hr size="1"&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;&lt;/strong&gt;&lt;a name="DimensioningandArrays"&gt;&lt;span style="color:#000000;"&gt;Advanced&lt;/span&gt;&lt;/a&gt; Subroutines and Labels&lt;/p&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;GoDB supports jumping using the GoTo Statements.&lt;br /&gt;iff a=1 then goto !Cond1&lt;br /&gt;iff a=2 then goto !Cond2&lt;br /&gt;goto !ENDPROG&lt;br /&gt;&lt;br /&gt;!Cond1&lt;br /&gt;print "Cond1"&lt;br /&gt;goto !ENDPROG&lt;br /&gt;&lt;br /&gt;!Cond2&lt;br /&gt;print "Cond2"&lt;br /&gt;!ENDPROG&lt;br /&gt;&lt;br /&gt;To allow jumping based on a variable GoDB supports Label Dereferencing. Using Label Dereferencing the label can be decided based on a string variable and a&lt;br /&gt;Dereferencing &lt;strong&gt;{operator&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;j$="Cond"+a&lt;br /&gt;goto !{j$}&lt;/strong&gt;&lt;br /&gt;goto !ENDPROG&lt;br /&gt;&lt;br /&gt;!Cond1&lt;br /&gt;print "Cond1"&lt;br /&gt;goto !ENDPROG&lt;br /&gt;&lt;br /&gt;!Cond2&lt;br /&gt;print "Cond2"&lt;br /&gt;!ENDPROG&lt;br /&gt;&lt;br /&gt;Similarly you can use Dereferencing operator to call Subroutines too.&lt;br /&gt;&lt;br /&gt;for i=1 to 3&lt;br /&gt;a$="Test"+i&lt;strong&gt;call&lt;br /&gt;{a$}&lt;/strong&gt;nextENDSub Test1print&lt;br /&gt;"Test1"EndSubSub Test2print&lt;br /&gt;"Test2"EndSubSub Test3print&lt;br /&gt;"Test3"EndSub&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;Note: &lt;/strong&gt;Dereferencing supports string variables only and not string expressions.Ex: call {s$+1} is not legal. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113283610813485677?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/conditional-statements.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113283101506511298</guid><pubDate>Thu, 24 Nov 2005 11:07:00 +0000</pubDate><atom:updated>2005-11-24T04:31:20.746-08:00</atom:updated><title>Variable Scope</title><description>&lt;p class="heading2"&gt;The variables have three types of scopes &lt;/p&gt;&lt;ul&gt;&lt;li&gt;GLOBAL &lt;li&gt;LOCAL &lt;li&gt;PAGE&lt;/li&gt;&lt;/ul&gt;&lt;p style="MARGIN-LEFT: 5px"&gt;Any variable that starts with &lt;strong&gt;~&lt;/strong&gt; is a global variable and is accessible from any function, subroutine and from any bas file in the project.&lt;br /&gt;All variables declared outside the subroutines and functions becomes a page-scope variable. This type of variable is accessible in any function and subroutine within the same bas file. Variables created in a function or a sub have a LOCAL scope. They can be accessed only within the function.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Home.Bas&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;Gnum1=10 &lt;span style="color:#008200;"&gt;'Page Variable - this variable can be accessed only in home.bas file.&lt;/span&gt;&lt;br /&gt;~glob=20 &lt;span style="color:#008200;"&gt;'Global Variable - this variable can be accessed in all the .bas files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;sub test1 &lt;br /&gt;&lt;br /&gt;Lnum1=30 &lt;span style="font-size:0;color:#008200;"&gt;'local variable accessible in test1 sub only&lt;/span&gt;&lt;br /&gt;print Gnum1 &lt;span style="color:#008200;"&gt;'gNum1 has PAGE scope, so it can be accessed in test1&lt;/span&gt;&lt;br /&gt;print Lnum1&lt;br /&gt;endsub &lt;br /&gt;&lt;br /&gt;sub test2 &lt;BR&gt;&lt;br /&gt;&lt;br /&gt;print Gnum1 &lt;span style="color:#008200;"&gt;'OK &lt;/span&gt;&lt;br /&gt;print ~glob &lt;span style="color:#008200;"&gt;'OK &lt;/span&gt;&lt;br /&gt;print Lnum1 &lt;span style="color:#008200;"&gt;'ERROR : LNum1 local variable accessible in test1 sub only&lt;/span&gt;&lt;br /&gt;endsub &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Home2.Bas&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="codestyle"&gt;sub test3 &lt;/span&gt;&lt;br /&gt;print ~glob &lt;span style="color:#008200;"&gt;'OK - if home.bas was loaded first and ~glob was initialized.&lt;/span&gt;&lt;br /&gt;print Gnum1 &lt;span style="color:#008200;"&gt;'ERROR : Gnum1 is accessible only in home.bas &lt;/span&gt;&lt;br /&gt;print Lnum1 &lt;span style="color:#008200;"&gt;'ERROR : LNum1 local variable accessible in test1 sub in home.bas only&lt;/span&gt;&lt;br /&gt;endsub&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113283101506511298?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/variable-scope.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113282124662434122</guid><pubDate>Thu, 24 Nov 2005 08:29:00 +0000</pubDate><atom:updated>2005-11-24T01:16:28.866-08:00</atom:updated><title>GoDB Lite Reviewed on All About Symbian</title><description>&lt;h2&gt;&lt;span style="font-size:78%;"&gt;Below the review of GoDB Lite Edition. You will now surely understand why I stand by GoDB. &lt;/span&gt;&lt;/h2&gt;&lt;p&gt;Source: &lt;a href="http://www.allaboutsymbian.com"&gt;www.allaboutsymbian.com&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Published by &lt;a href="/reviews/?a=Steve_Litchfield"&gt;Steve Litchfield&lt;/a&gt; at 15:57 GMT, October 14th 2005 under &lt;a href="/reviews/all/Applications/"&gt;Applications&lt;/a&gt; in &lt;a href="/reviews/Series_60/"&gt;Series 60&lt;/a&gt;, &lt;a href="/reviews/N-Gage/"&gt;N-Gage&lt;/a&gt;&lt;/p&gt;&lt;div class="rev_summary"&gt;&lt;br /&gt;Steve Litchfield reviews Go-DB Lite, a new development system for Symbian Series 60&lt;/div&gt;&lt;br /&gt;&lt;div class="rev_version"&gt;Version Reviewed: 3.6&lt;/div&gt;&lt;br /&gt;&lt;div class="rev_score"&gt;Score: 75&lt;/div&gt;&lt;br /&gt;&lt;div class="reviewtext"&gt;&lt;p&gt;So you've thought about writing a little program for your Series 60 smartphone? &lt;/p&gt;&lt;p&gt;At the one end of the programming spectrum you have the wizards at Zingmagic, EMCC, Synergenix and so on, all working in Symbian-optimised C++. To become productive in C++ for Symbian OS takes a long time, a really long time. We're talking about man months. And at the end of this time if you've not got an IQ of at least 150 then the chances are all you'll have done is give yourself a headache. It's OK if someone's employing you to learn, but the chances are you're having to learn in your spare time, in which case you won't have much of a social life for a while.&lt;/p&gt;&lt;p&gt;Somewhere near the other end of the spectrum is your favourite and mine, OPL, the BASIC like language created by Psion and which has worked well on everything from Psion palmtops to Nokia and Sony Ericsson smartphones. There are keywords for menus and dialogs and a clutch of handy file and graphics routines, but you're largely on your own and can create anything you like. To produce a decent application in OPL, from scratch (with no prior knowledge), you're looking at a week of work, even if you'll be avoiding the headaches of C++. (For more on learning OPL, see &lt;a href="http://www.allaboutsymbian.com/reviews/item/Rapid_Mobile_Enterprise_Development_for_Symbian_OS.php" target="_blank"&gt;Ewan's book&lt;/a&gt;). In addition, OPL doesn't currently run on any of the Symbian OS 8 devices, and that's most of the really cool ones.&lt;/p&gt;&lt;p&gt;Go-DB Lite is designed to sit even closer to the 'easy' end of the programming spectrum, letting you produce Series 60 applications quickly and efficiently, although with a few rather important caveats. It's unashamedly a form-based tool, making it superb for typical business 'calculator' or 'data collector' style applications and a pain in the neck for anything graphical or involving real time operations, for which you have to hand craft BASIC-like statements in the code editor windows. If you can define your application idea in terms of a number of separate 'screens' (forms), with text and numbers to be filled in and with other screens and windows appearing depending on what you entered, then you're on your way with Go-DB Lite.&lt;/p&gt;&lt;p align="center"&gt;&lt;img height="372" alt="GStudio IDE" src="http://www.allaboutsymbian.com/reviews/images/godb/godb1.gif" width="400" border="1" /&gt;&lt;/p&gt;&lt;p&gt;&lt;img height="576" alt="The built-in 'emulator'" src="http://www.allaboutsymbian.com/reviews/images/godb/hang0.jpg" width="302" align="right" border="0" /&gt;Go-DB (without the Lite) is a lot more expensive and designed to handle 'enterprise' applications, run on any portable device with a Go-DB runtime for Palm, Pocket PC, Series 60, etc. Go-DB Lite is a new venture, with ConsignTech recognising that many hobbyist Series 60 users would find it rather fun to write their own programs. One example of the slightly changed focus of Go-DB here is the inclusion in the excellent Help screens of a section called 'Game functions', which include routines to display images and play sounds. These game functions are very much tacked on to main product, which remains focussed on string variables and forms, but they do work. To prove the point, here are a &lt;a href="http://www.allaboutsymbian.com/develop/godb/gBall.sis"&gt;bouncing ball&lt;/a&gt; and &lt;a href="http://www.allaboutsymbian.com/develop/godb/TicTacToe.sis"&gt;TicTacToe&lt;/a&gt; in SIS format (try them), both examples supplied with Go-DB Lite. The integration of graphics and sound with the main development system is a little arcane and disappointing: having dragged an image onto a Go-DB form, it's shown only as a black rectangle of the wrong size (though GIF files can be 'rendered' if you dig deep into 'Options'). You then have to manually resize it and generally 'imagine' what it should look like.&lt;/p&gt;&lt;p&gt;Working on a simple application that uses forms and popup boxes is a lot more straightforward, I knocked up this &lt;a href="http://www.allaboutsymbian.com/develop/godb/vatcalc.sis"&gt;VAT calculator&lt;/a&gt; in (literally) 10 minutes. And, unlike the current version of OPL, it runs on any Series 60 phone. Pretty cool if your intended application falls in this genre. Every application is forced to have a 'login' screen (where things like user tracking and activation happen), another result of Go-DB's enterprise heritage, although you can bypass this and move straight to your main form with a single command. &lt;/p&gt;&lt;p&gt;GStudio, the Go-DB IDE (Integrated Development Environment), is pretty comprehensive once you take into account the caveats mentioned above. A browser on the left shows project files (forms and BASIC code modules) and images, with each coming up in its own window in the main space, where it can be tiled, hidden or maximised. A properties pane is usually present on the right hand side and individual properties are easy to change, with alterations shown immediately in the appropriate form windows. An array of tools for designing forms is dominated by form controls (list boxes, etc). Finally, an output window at the bottom of the IDE shows warnings and any success messages, plus any debug information if you've asked for this.&lt;/p&gt;&lt;p&gt;GStudio has been pre-programmed with the right product IDs for most recent Symbian Series 60 devices and the IDE can build SIS files for a particular device if needed. For most purposes though, it's easy enough to specify a 'Generic Series 60 device', which will run on anything from a Nokia 7610 upwards. Your application gets packaged with the 320K Go-DB runtime, making even a trivial utility appear to be the best part of half a Megabyte. When run, the RAM useage is similar.&lt;/p&gt;&lt;p&gt;&lt;img height="217" alt="The build SIS options" src="http://www.allaboutsymbian.com/reviews/images/godb/godb3.gif" width="402" align="right" border="0" /&gt;Quite apart from the omissions in the image-handling department, there are other signs that Go-DB Lite isn't a mature product yet. The main 'Build' menu has options for 'Compile', 'Build', 'Rebuild all', 'Clean', 'Run', and so on. I appreciate that there are probably distinctions between these at the code level, but all a new user wants to see is a single option: 'Build'. Or, better, 'Build and run'. Similarly for the multitude of device build options ('Nokia 6260, Nokia 6600, etc.), when the vast majority of people will simply want to build for a class of device (e.g. Symbian OS 7 or 8), so that their application runs on as many devices as possible without having to make lots of different versions. A 'Check for new updates' option on the main Help menu seems like a good idea but, when run, offers a page of 'more recent' modules - these are largely irrelevant to Go-DB Lite and they're all also around a year old, at which time Go-DB Lite hadn't even been created.&lt;/p&gt;&lt;p&gt;If all this seems over critical, then I make no apologies. If Go-DB wasn't any good then I'd just slam it and move on, but it's actually got potential and I'd rather the developers saw enough interest in the product that they put work into improving it. I'm going to persevere with Go-DB because (in the absence of a OPL runtime for modern devices) it's about the only way for users to program their smartphone without having to spend months learning Symbian dialects of Java or C++. &lt;/p&gt;&lt;p&gt;So, with a view to using Go-DB Lite in earnest, I set up trying to convert my Hangman game (previously written in OPL). First, a couple of screenshots, so that you can see that I did get there in the end:&lt;/p&gt;&lt;p align="center"&gt;&lt;img height="549" alt="Hangman image" src="http://www.allaboutsymbian.com/reviews/images/godb/hang1.jpg" width="276" border="0" /&gt; &lt;img height="549" alt="Hangman" src="http://www.allaboutsymbian.com/reviews/images/godb/hang2.jpg" width="276" border="0" /&gt;&lt;/p&gt;&lt;p&gt;Most of the core formulae could be used as-is, with GBasic only differing from OPL (or any other BASIC) by a few characters here and there. Even the graphics handling turned out to be similar to OPL. Having to store images on forms, retrieve them to a hidden string buffer and then draw them onto a form as needed, isn't so different from retrieving image files into graphics ids in OPL and then copying them into an on-screen window. The biggest difference was the form-based, object-oriented approach, which means that you have to think in terms of specific forms that paint themselves according to the BASIC code you've specified. Keypresses while a form is shown are handled within a Form_Keypress subroutine, and so on. Once you get used to this, most applications could be adapted fairly easily, although I suspect that real-time arcade games would be somewhat harder.&lt;/p&gt;&lt;p&gt;The main showstoppers I found were to do with the lack of maturity mentioned above. For example, I was trying to use a sprite array (for the Hangman 'hung' images), but a bug in the Go-DB system meant that sprites weren't always shown correctly. I also started getting an 'Internal error, please contact support', which is never a good sign in an application. The building to SIS format is also lacking in sophistication - there's currently no way to automatically include your own version number or include your own certification '.key' file, so that the SIS file is signed as being 'from' you. (In practice, you could build your own SIS using the standard Symbian MAKESIS utility, but this should really be handled by the IDE that you've paid good money for.) Finally, you can only write a single font on screen at present. For most applications this simply isn't good enough.&lt;/p&gt;&lt;p&gt;Back on the positive side, there are some pretty powerful Symbian smartphone-specific system functions, though you have to dig pretty deep into the Help screens to spot how to use them. You can send and receive SMS messages, check GPRS/Bluetooth/battery status, make and receive voice calls and even play back video files directly, which is very cool for such a RAD tool. &lt;/p&gt;&lt;p&gt;Although the purchase price of $200 is enough to put casual users off, there's a trial version, meaning that you've got no excuse for downloading and at least having a play. For the company looking to make a custom 'calculator' or database-driven application for deployment to its employees' smartphone, Go-DB Lite is just the ticket. For the home user with a good idea for an application or game, Go-DB Lite is a viable option, even if you do currently have to work rather harder than you ought to.&lt;/p&gt;&lt;p&gt;With more development and 'polishing' (and I'm sure this will happen in the very near future), Go-DB could become a genuinely mainstream system. Watch this space for an updated review in a month or so, once ConsignTech have released another version or two...&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113282124662434122?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/godb-lite-reviewed-on-all-about.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113281749584977313</guid><pubDate>Thu, 24 Nov 2005 07:21:00 +0000</pubDate><atom:updated>2005-11-23T23:31:35.913-08:00</atom:updated><title>Reviews &amp; News on GoDB</title><description>&lt;span style="font-family:Arial,Helvetica;font-size:85%;"&gt;Mobile app dev tool adds Windows Mobile 5.0&lt;/span&gt;&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;Source: &lt;a href="http://www.windowsfordevices.com/"&gt;www.windowsfordevices.com&lt;/a&gt;&lt;br /&gt;&lt;td width="100%" height="20"&gt;&lt;span style="font-family:Arial,Helvetica;font-size:85%;"&gt;Oct. 10, 2005&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial,Helvetica;font-size:100%;"&gt;&lt;!- 1 2 3 4 5-&gt;Consign Technology (Consigntech) has added support for Windows Mobile 5.0 to the latest release of its multi-platform tool for "rapid" development of mobile business applications. Consigntech characterizes GoDB as a "Develop Once, Deploy Anywhere" platform that runs applications on devices ranging from handhelds to desktops.&lt;br /&gt;&lt;br /&gt;The GoDB IDE includes a GUI forms builder, scripting engine, and embedded RDBMS database with an ANSI SQL-92 engine, according to Consigntech. New features in version 3.6 include extending applications with native DLL-based objects, enterprise contols such as grids and lookup tables, and 2D gaming functions.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://www.windowsfordevices.com/files/misc/GoDBscreen.gif" target="new"&gt;&lt;img src="http://www.windowsfordevices.com/files/misc/GoDBscreen-sm.jpg" vspace="5" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;GoDB IDE screen shot&lt;/b&gt;&lt;br /&gt;(Click for larger view)&lt;/center&gt;&lt;br /&gt;GoDB applications can be designed to run offline, online, or in a "hybrid" mode, according to Consigntech. Offline appications cache their data on the client until a secure connection is available for synchronizing with the server. Online apps assume "always on" connectivity for real-time information exchange. Hybrid apps rely on "master data tables" stored on the device, which are periodically synchronized with the server. The user executes real-time transactions using the local tables.&lt;br /&gt;&lt;br /&gt;Consigntech will shortly release a "Lite" edition of GoDB without the embedded database. The company says the Lite version will target non-enterprise developers looking to develop applications such as utilities and 2D games.&lt;br /&gt;&lt;br /&gt;The GoDB Enterprise IDE retails for $499. Educational and non-commercial applcations can be deployed free. Commercial deployments require seperately purchased VM licenses. A 30-day free trial download is available &lt;a href="http://www.go-db.com/godb_login.asp?rdir=%2Fdownloadcount%2Easp%3Ffile%3DGoDB36%26type%3DGoDB36%26link%3Dhttp%3A%2F%2Fwww%2Econsigntech%2Ecom%2Fdownloads%2F34%2Fgodb36%2Ezip" target="new"&gt;&lt;u&gt;here&lt;/u&gt;&lt;/a&gt; after registration.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Arial,Helvetica;font-size:100%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113281749584977313?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/reviews-news-on-godb.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113281606431953845</guid><pubDate>Thu, 24 Nov 2005 07:07:00 +0000</pubDate><atom:updated>2005-11-23T23:11:50.396-08:00</atom:updated><title>GoDB Enterprise Edition -- Data Sheet</title><description>&lt;span style="font-family:Verdana;font-size:85%;"&gt;Develop Once, Deploy Anywhere&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GoDB is a Multi-Platform Application Development tool for developing handheld and wireless applications. GoDB lets you develop applications you code once and deploy them to multiple platforms like Windows Mobile (Pocket PC, Smart phone, Win CE), Palm OS, Symbian, Linux, Windows, etc. without any change. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GoDB SDK comes with an IDE that lets you &lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;create, modify, build, run, simulate, debug and deploy &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;your applications to multiple platforms from familiar Microsoft Windows.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;IDE has the following components:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Form Builder. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Simulators for devices/PCs. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Integrated source level debugger. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Single click CAB / SIS / Setup package creation &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;System requirements:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Operating System: Windows 98 and above&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Recommended Hardware:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;256 MB RAM (minimum 128 MB)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;667 Mhz processor, X86 architecture&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;1024 x 768 pixel screen or better&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;16-bit color or more&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Features &amp; Description:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Portability: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Application once developed using GoDB is portable across multiple platforms like Windows Mobile (Pocket PC, Smart phones, Win CE), Symbian, Palm, Linux, Embedded Linux and Windows. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Security:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Built in support for security at various level like on Device, data transfer and server side. GoDB by defaults provides support for AES encryption; other third party encryption can also be supported.&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;External Component:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Other platform requires separate licenses to be purchased for Embedded databases (SQL CE, Oracle Lite). In case of GoDB, the Run time client has the embedded database (ANSI SQL Compatible). &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Form Factor:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GoDB has a browser based Interface, hence creating complicated scrolling forms is easy, in case of large forms the scroll buttons appears automatically. Fields for lookups auto populating transaction fields etc can be inserted into the form without the need for even a single line of code. &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Focus Target&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Unlike other platforms, which are for general-purpose application development, GoDB focus mainly on business application so the UI widgets required for biz apps are already a part of GoDB. Moreover, GoDB is optimized for database operations like lookups, filters, reports etc making GoDB apps much faster than other comparable platforms. This means that most of the business application components need not be coded from scratch.&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Online - Offline:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GoDB applications can transition between online and offline seamlessly and can also operate in hybrid modes where transactions can be online with offline masters. &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Compression: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GoDB comes with in-built compression technology, which compresses data up to 70% there by reducing the sync times between the device and the application. &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Database Compatibility:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;In Non-GoDB application, the Embedded RDBMS requires the server version of the same RDBMS (for eg Oracle lite requires Oracle on the server side). In case of GoDB it is compatible with SQL Server and Oracle. &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Multi Lingual Support:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GoDB has a Language abstraction layer built in. Due to this GoDB can support multiple languages with one screen. GoDB can also support languages, which are not natively supported by the Hardware. &lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Power Management:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Built in support for software power management. This enhances the battery life of the PDA while running the business application. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113281606431953845?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/godb-enterprise-edition-data-sheet.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113281545645429870</guid><pubDate>Thu, 24 Nov 2005 06:44:00 +0000</pubDate><atom:updated>2005-11-23T22:57:39.376-08:00</atom:updated><title>GBasic Variables and Objects</title><description>&lt;p&gt;GBasic has two types of variables, numeric and string variables. &lt;/p&gt;&lt;p&gt;String variables and functions that return strings always terminate with a &lt;strong&gt;$.&lt;/strong&gt;&lt;br /&gt;                 &lt;br /&gt;          Ex: A$,B$, Mid$(a$,1,2) etc&lt;br /&gt;                 &lt;br /&gt;Variables &lt;strong&gt;without&lt;/strong&gt; a $ at the end are considered to be numeric variables.&lt;br /&gt;&lt;br /&gt;GBasic has two types of objects , Form Field Objects (Controls on a form) and Database Field objects.&lt;br /&gt;                  &lt;br /&gt;Form field objects precede with a #&lt;br /&gt;                  &lt;br /&gt;          Ex: #UID , #UID$ etc.&lt;br /&gt;                  &lt;br /&gt;Database field objects precede with a &lt;b&gt;@&lt;/b&gt;&lt;br /&gt;                &lt;br /&gt;          EX: @a.ID, @a.Name$&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p class="heading2"&gt;&lt;a name="GBasicOperators"&gt;&lt;span style="color:#000000;"&gt;GBasic Operators&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Operators For Numeric variables&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;      + ADD&lt;br /&gt;      - SUB&lt;br /&gt;      * MULT&lt;br /&gt;      / Division&lt;br /&gt;      \ Integer Division&lt;br /&gt;      % MOD&lt;br /&gt;      ^ Integer Exponent&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;GBasic supports the following Comparison Operators.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;       &gt; Greater than&lt;br /&gt;       &lt; Less Than&lt;br /&gt;       = Equal&lt;br /&gt;     &lt;&gt; Not Equal&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;GBasic supports the following Logical Operators.&lt;/strong&gt;&lt;br /&gt;    &lt;br /&gt; AND     OR&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Operators For String Variables&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;+ Append&lt;br /&gt;EX:&lt;br /&gt;&lt;br /&gt;     B$="Test1"&lt;br /&gt;     A$=" Hello " +B$&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: When appending a large number of strings use &lt;strong&gt;Concat&lt;/strong&gt; Function instead of the + operator.&lt;br /&gt;&lt;br /&gt;You can also append numeric literals, variables and expressions to strings.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;    ' Numeric Literal&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;    A$=" Hello " + 100.25&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;    'Numeric Variable&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;    c=100&lt;br /&gt;    A$=" Hello " + b$ + c&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;    'Numeric Expressions appended to strings&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;c=100&lt;br /&gt;d=200&lt;br /&gt;A$=" Hello " + b$ + (c+d*20)&lt;br /&gt;A$= (c*10+23) + " Hello There "&lt;br /&gt;A$ = "Ubound of array is " + ubound(st$)&lt;br /&gt;A$ = "Len of String is " +  len("Hello")&lt;br /&gt;A$ = "Len of String is " +  len("Hello") +20 +" Done "&lt;br /&gt;A$ = "Len of String is " +  ( len("Hello") +20 ) +" Done "&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;GBasic supports the following String Comparison Operators.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;=    Equal&lt;br /&gt;&lt;&gt; Not Equal&lt;br /&gt;&lt;br /&gt;EX:&lt;br /&gt;&lt;br /&gt;if a$=b$ then&lt;br /&gt;print "a is equal to b"&lt;br /&gt;endif&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;String Escaping&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Special chars like " etc are escaped with a back slash '\' in a string Literal.&lt;br /&gt;&lt;br /&gt;Ex&lt;br /&gt;a$="Hello there \"124\" "&lt;br /&gt;a$="Hello there \n"&lt;br /&gt;a$="C:\\Temp\\a.txt"&lt;br /&gt;&lt;br /&gt;Special Chars &lt;br /&gt;&lt;br /&gt;\n  - New Line&lt;br /&gt;\r  - Carriage Return&lt;br /&gt;\t - Tab&lt;br /&gt;\" - Double Quote&lt;br /&gt;\' - Single Quote&lt;br /&gt;\\ - Backslash&lt;br /&gt;&lt;br /&gt;Other chars can be specified by specifying the HEX value prefixed \x&lt;br /&gt;&lt;br /&gt;EX:&lt;br /&gt;a$="Hello there \x0D \x0A  "&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Special Numeric Statements&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;You can use C Style Increment ,Decrement  and Cumulative Numeric&lt;br /&gt;statements&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Increment ++&lt;br /&gt;Decrement --&lt;br /&gt;Cumulative Numeric , +=&lt;br /&gt;, -= , *=&lt;br /&gt;etc&lt;br /&gt;Ex:&lt;br /&gt;a++&lt;br /&gt;b--&lt;br /&gt;a+=10&lt;br /&gt;a-=20&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Etc: Note these commands cannot be used in expressions.&lt;br /&gt;Ex&lt;/strong&gt;: a = b+(c++) is not allowed.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Numeric Literals in other bases Hexadecimal and Binary.&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;GBasic Supports Hex Literals of the format &lt;strong&gt;&amp;h&lt;/strong&gt;AABBCC and binary Literals &lt;strong&gt;&amp;amp;b&lt;/strong&gt;1010&lt;br /&gt;&lt;br /&gt;Ex:&lt;br /&gt;' Hex Literal&lt;br /&gt;a=&amp;amp;hEF10D&lt;br /&gt;'&lt;br /&gt;Binary Literal&lt;br /&gt;b=&amp;b10101&lt;br /&gt;'String Append with Hex Literal&lt;br /&gt;a$="Test "&lt;br /&gt;+ &amp;amp;amp;hEF10 + "*" + &amp;amp;b10101&lt;br /&gt;&lt;br /&gt;' Convert Decimal to Hex&lt;br /&gt;print&lt;br /&gt;Format$("%x",1000)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113281545645429870?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/gbasic-variables-and-objects.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-19206046.post-113280969867152011</guid><pubDate>Thu, 24 Nov 2005 05:21:00 +0000</pubDate><atom:updated>2005-11-23T21:42:56.990-08:00</atom:updated><title>GBasic Introduction &amp; Program Structure</title><description>&lt;p&gt;GBasic is a variant of the Basic Language included in GoDB platform as the scripting language.It’s a simple and easy to language for the average and new entrant developer to program for mobile devices without the need for knowledge of the mobile platform concerned and high end language&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a name="ProgramStructure"&gt;&lt;span style="color:#000000;"&gt;Program Structure&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;GBasic programs are usually associated with a form and have the same name as that of the form.&lt;br /&gt;&lt;br /&gt;For example&lt;br /&gt;&lt;br /&gt;Home.Frm will have an associated BAS file in the project called home.bas.&lt;br /&gt;When Home.Frm is loaded, GBasic scripting engine loads home.bas and executes all statements, till the END statement is not encountered.&lt;br /&gt;&lt;br /&gt;Home.bas&lt;br /&gt;&lt;br /&gt;a=10&lt;br /&gt;b=20&lt;br /&gt;print a,b&lt;br /&gt;END&lt;br /&gt;sub Button1_click&lt;br /&gt;msgbox "Button clicked"&lt;br /&gt;endsub&lt;br /&gt;&lt;br /&gt;The program can also have subroutines that are event handlers for controls in the form, like a mouse click event on a control.&lt;br /&gt;&lt;br /&gt;Event Handlers have names that are of the format ControlName_EventName&lt;br /&gt;&lt;br /&gt;Ex: Button0_Click&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1937791175561856";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19206046-113280969867152011?l=godbdevnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://godbdevnet.blogspot.com/2005/11/gbasic-introduction-program-structure.html</link><author>noreply@blogger.com (Author)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>