{"id":45,"date":"2008-09-16T11:16:11","date_gmt":"2008-09-16T01:16:11","guid":{"rendered":"http:\/\/www.malcolmgroves.com\/blog\/?page_id=45"},"modified":"2008-09-16T21:59:53","modified_gmt":"2008-09-16T11:59:53","slug":"ibsite","status":"publish","type":"page","link":"http:\/\/www.malcolmgroves.com\/blog\/?page_id=45","title":{"rendered":"IBSite"},"content":{"rendered":"<p><span id=\"ucGenericFirstItemView_Label1\" class=\"LightNormalText\">CodeSite 2, from <a href=\"http:\/\/www.raize.com\/\">Raize Software <\/a>, is a powerful debugging tool for Borland Delphi and C++Builder. The problem? Often not all of the logic in your application is contained in Delphi or C++Builder code. Some logic is often contained in Stored Procedures and Triggers. However, by itself, CodeSite will only let you trace the flow of execution to the boundary of your Delphi or C++Builder code. What goes on inside your database is pretty much a mystery to CodeSite.<\/span><\/p>\n<p>Well, IBSite tries to fix that. IBSite is a free extension to CodeSite 2 which allows CodeSite messages to be sent from Interbase Stored Procedures and Triggers. It comes as a collection of UDF&#8217;s (User Defined Functions), which once installed into Interbase, can be called like any other statement from Interbase SQL.<\/p>\n<h3 class=\"LightTitleText\">Requirements<\/h3>\n<p>IBSite has been tested with CodeSite 2 Professional and Interbase v6.0 on Windows. I don&#8217;t think I&#8217;m taking advantage of any of the features not present in CodeSite 2 Standard, so I believe it should also work with the Standard Edition, but let me know if you strike any issues. Additionally, Interbase has had UDF support for a number of versions, so I believe it should also work with any Interbase version on Windows which supports UDF&#8217;s. As I, or others, try it out with more versions, we&#8217;ll post the results.<\/p>\n<h3><span id=\"ucGenericFirstItemView_Label1\" class=\"LightNormalText\"><\/p>\n<p class=\"LightTitleText\">Example:<\/p>\n<p><\/span><\/h3>\n<p><span id=\"ucGenericFirstItemView_Label1\" class=\"LightNormalText\">As an example, the following test Stored Procedure:<\/span><\/p>\n<pre class=\"sourcecode\"><code class=\"keyword\">set<\/code> term # ;\r\ncreateprocedure TestCS\r\n<code class=\"keyword\">AS<\/code>\r\n<code class=\"keyword\">begin<\/code>\r\n  executeprocedure csClear;\r\n  executeprocedure csCategoryColor <code class=\"quote\">'clWhite'<\/code>;\r\n  executeprocedure csEnterMethod <code class=\"quote\">'TestCS'<\/code>;\r\n  executeprocedure csCategory <code class=\"quote\">'IBSite Test'<\/code>;\r\n  executeprocedure csAddCheckPoint;\r\n  executeprocedure csResetCheckpoint;\r\n  executeprocedure csAddCheckPoint;\r\n  executeprocedure csAddSeparator;\r\n  executeprocedure csSendMemoryStatus;\r\n  executeprocedure csSendMsg <code class=\"quote\">'Msg'<\/code>;\r\n  executeprocedure csDisable;\r\n  executeprocedure csSendMsg <code class=\"quote\">'Should not see this'<\/code>;\r\n  executeprocedure csEnable;\r\n  executeprocedure csCategoryColor <code class=\"quote\">'clYellow'<\/code>;\r\n  <code class=\"keyword\">if<\/code> (csEnabled() = 1) <code class=\"keyword\">then<\/code>\r\n    executeprocedure csSendMsg <code class=\"quote\">'CodeSite Already Enabled'<\/code>;\r\n  <code class=\"keyword\">else<\/code>\r\n  <code class=\"keyword\">begin<\/code>\r\n    executeprocedure csEnable;\r\n    executeprocedure csSendMsg <code class=\"quote\">'Just Enabled CodeSite'<\/code>;\r\n  <code class=\"keyword\">end<\/code>\r\n  executeprocedure csSendMsg <code class=\"quote\">'Should see this'<\/code>;\r\n  executeprocedure csSendString <code class=\"quote\">'String'<\/code>, <code class=\"quote\">'Value'<\/code>;\r\n  executeprocedure csSendInteger <code class=\"quote\">'Integer'<\/code>, 1;\r\n  executeprocedure csSendFloat <code class=\"quote\">'Float'<\/code>, 1.1;\r\n  executeprocedure csSendNote <code class=\"quote\">'This is a test note'<\/code>;\r\n  executeprocedure csWriteInteger <code class=\"quote\">'First'<\/code>, <code class=\"quote\">'Integer'<\/code>, 1;\r\n  executeprocedure csWriteFloat <code class=\"quote\">'Second'<\/code>, <code class=\"quote\">'Float'<\/code>, 1.1;\r\n  executeprocedure csWriteString <code class=\"quote\">'Third'<\/code>, <code class=\"quote\">'String'<\/code>, <code class=\"quote\">'Value'<\/code>;\r\n  executeprocedure csWriteMsg <code class=\"quote\">'Fourth'<\/code>, <code class=\"quote\">'Msg'<\/code>;\r\n  executeprocedure csExitMethod <code class=\"quote\">'TestCS'<\/code>;\r\n<code class=\"keyword\">end<\/code> #\r\n<code class=\"keyword\">set<\/code> term ; #<\/pre>\n<p>produces the following output in the CodeSite 2 viewer:<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n<tbody>\n<tr>\n<td class=\"PhotoSpacer\"><\/td>\n<td><a href=\"..\/..\/images\/ibsitescreenshot.gif\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"..\/..\/images\/ibsitescreenshot_med.gif\" border=\"0\" alt=\"\" width=\"475\" height=\"231\" \/> <\/a><\/p>\n<div class=\"LightSmallText\">Click image for larger screenshot<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Currently, IBSite supports the following CodeSite 2 calls, inside your Interbase SQL code. This seems to cover most basic requirements.<\/p>\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<div class=\"LightTitleText\">CodeSite<\/div>\n<\/td>\n<td width=\"50%\">\n<div class=\"LightTitleText\">IBSite Equivalent<\/div>\n<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.Category<\/td>\n<td width=\"50%\">csCategory<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.CategoryColor<\/td>\n<td width=\"50%\">csCategoryColor<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.AddSeparator<\/td>\n<td width=\"50%\">csAddSeparator<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.AddCheckpoint<\/td>\n<td width=\"50%\">csAddCheckpoint<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.ResetCheckpoint<\/td>\n<td width=\"50%\">csResetCheckpoint<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.SendMemoryStatus<\/td>\n<td width=\"50%\">csSendMemoryStatus<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.Clear<\/td>\n<td width=\"50%\">csClear<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.Enabled := True<\/td>\n<td width=\"50%\">csEnable<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.Enabled := False<\/td>\n<td width=\"50%\">csDisable<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.Enabled<\/td>\n<td width=\"50%\">csEnabled<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.DestinationDetails<\/td>\n<td width=\"50%\">csDestinationDetails<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.EnterMethod<\/td>\n<td width=\"50%\">csEnterMethod<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.ExitMethod<\/td>\n<td width=\"50%\">csExitMethod<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.SendMsg<\/td>\n<td width=\"50%\">csSendMsg<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.SendString<\/td>\n<td width=\"50%\">csSendString<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.SendInteger<\/td>\n<td width=\"50%\">csSendInteger<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.SendFloat<\/td>\n<td width=\"50%\">csSendFloat<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.SendNote<\/td>\n<td width=\"50%\">csSendNote<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.WriteInteger<\/td>\n<td width=\"50%\">csWriteInteger<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.WriteFloat<\/td>\n<td width=\"50%\">csWriteFloat<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.WriteString<\/td>\n<td width=\"50%\">csWriteString<\/td>\n<\/tr>\n<tr class=\"LightNormalText\">\n<td width=\"50%\">CodeSite.WriteMsg<\/td>\n<td width=\"50%\">csWriteMsg<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!-- InstanceEndEditable --><\/p>\n<h3 class=\"LightTitleText\">History<\/h3>\n<p>v1.0 &#8211; 18 August 2001<\/p>\n<ul>\n<li>Initial Public Release<\/li>\n<\/ul>\n<div class=\"LightTitleText\">Download<\/div>\n<ul>\n<li>\n<div class=\"LightNormalText\">v1.0\u00a0 \t  <a href=\"http:\/\/codecentral.borland.com\/codecentral\/ccweb.exe\/listing?id=16486\">CodeCentral #16486<\/a><\/div>\n<\/li>\n<\/ul>\n<div class=\"LightNormalText\">CodeSite is a trademark of <a href=\"http:\/\/www.raize.com\/\">Raize Software <\/a>.<br \/>\nInterbase is a trademark of \t  <a href=\"http:\/\/www.codegear.com\/\">CodeGear<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>CodeSite 2, from Raize Software , is a powerful debugging tool for Borland Delphi and C++Builder. The problem? Often not all of the logic in your application is contained in Delphi or C++Builder code. Some logic is often contained in Stored Procedures and Triggers. However, by itself, CodeSite will only let you trace the flow [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":19,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-45","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":3,"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/45\/revisions"}],"predecessor-version":[{"id":239,"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/45\/revisions\/239"}],"up":[{"embeddable":true,"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/19"}],"wp:attachment":[{"href":"http:\/\/www.malcolmgroves.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}