David,
The Glorious R:BASE 2000 (ver 6.5++) for Windows typical installation includes the following SAMPLES. C:\RBTI\RBWIN65\SAMPLES\CMS C:\RBTI\RBWIN65\SAMPLES\CONCOMP C:\RBTI\RBWIN65\SAMPLES\HISTORY C:\RBTI\RBWIN65\SAMPLES\NEWSTUFF C:\RBTI\RBWIN65\SAMPLES\VBSCRIPT The VBSCRIPT folder includes five VBScript samples: Thanks to Mike Byerley. ... we need to bring Mike Byerley as guest speaker at the April 2002 Annual R:BASE Developers' Conference... AxComp.ZIP: . An ActiveX component that shows a form with a list box with a capacity of a long integer. . Returns Selected Value or Return Value. . Has Sample R:BASE Code. FileSize.Zip: . Gets the size of a File and Returns a Value. . Has Sample R:BASE Code. FormRept.ZIP: . Reads the Ascii Procedure file and logs occurrences of Forms and Reports to a text file. . Has Sample R:BASE Code. RbMsgBox.ZIP: . Gives 2 methods of displaying large amount of text in a popup message box that returns a value based on the response button pressed. . Has Sample R:BASE Code. ScrnRes.ZIP: . Gets the Screen resolution of the computer and sets RBGsize based on that value. . Has Sample R:BASE Code. Very Best Regards, Razzak. At 08:00 AM 11/22/01 -0500, David Blocker wrote: >Where can we find a listing of the available VBScripts >on the CD and how to use them? Do they automatically >get installed when R:Base gets loaded on, or do you >have to do a "customized" installation? > >David Blocker > >----- Original Message ----- >From: "A. Razzak Memon" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, November 21, 2001 9:56 AM >Subject: Re: From The Edge: Add Your Own Functions to R:BASE > > >> >> >> And then, you could use the new LAUNCH command in The Glorious >> R:BASE 2000 (ver 6.5++) for Windows for seamless integration >> of those VBScript(s) in you commands ... icing on the cake! >> >> The cool collection of VBScripts is included with the CD >> and new installation of R:BASE 2000 (ver 6.5++) for Windows. >> >> Very Best Regards, >> >> Razzak. >> >> At 09:36 AM 11/21/01 -0500, Mike Byerley wrote: >> >> >I couldn't agree more with this underutilized ability in RBase. Let >Razaak >> >devote precious resources to the big picture and let the niggling small >> >things go for a while and anything you can't dream up in a stored >procedure, >> >you can get from a VBScript (no kidding). >> > >> > >> >----- Original Message ----- >> >From: "A. Razzak Memon" <[EMAIL PROTECTED]> >> >To: <[EMAIL PROTECTED]> >> >Sent: Wednesday, November 21, 2001 9:06 AM >> >Subject: From The Edge: Add Your Own Functions to R:BASE >> > >> > >> >> >> >> November 21, 2001 >> >> >> >> ==================================================================== >> >> From the Edge: Add Your Own Functions to R:BASE >> >> Section: Stored Procedures and Triggers >> >> Chapter: Running R:BASE Your Way! >> >> Platform: R:BASE 2000 (ver 6.5++) for DOS/Windows >> >> Build: 1.842xRT03 and Higher >> >> ==================================================================== >> >> >> >> With the enhancements and major bug-fixes in the recent versions >> >> of R:BASE 2000 (version 6.5) and higher, sometimes you wonder >> >> what you could do to take advantage of powerful features, such as >> >> creating your own functions using Stored Procedures and Triggers. >> >> >> >> Well, here is just a simple example to show you how you can use >> >> the POWER of R:BASE Features to create your own function. >> >> >> >> Instead of bugging R:Team to include small functions like how to >> >> find the Integer Week from any given date, you could create your >> >> own function. >> >> >> >> The following example shows how to create a Stored Procedure to >> >> make this work, and how you can effectively "Add Your Own Functions" >> >> to R:BASE. >> >> >> >> Put the following in a file called IWK.PRO >> >> >> >> *(IWK.PRO - Stored Procedure to find Integer Week) >> >> -- Date in question is in the parameter p1 >> >> >> >> -- Extract the Current Year >> >> SET VAR vYear INTEGER = (IYR4(.p1)) >> >> >> >> -- Create the date of January 1 for this year >> >> SET VAR vJan01 DATE = (RDATE(1,1,.vYear)) >> >> >> >> -- Get the day of the week for January 1 >> >> SET VAR vDwk INTEGER = (IDWK(.vJan01)) >> >> >> >> -- Compute the number of days between January 1 and our date >> >> SET VAR vDiff INTEGER = (.p1 - .vJan01) >> >> >> >> -- Adjust this difference to compensate for the day of the >> >> -- week for January 1 >> >> SET VAR vDiff = (.vDiff - .vDwk + 1) >> >> >> >> -- Now compute the week for our date >> >> SET VAR vIWK INTEGER = ((.vdiff/7) + 1) >> >> CLEAR VAR vYear, vJan01, vDwk, vDiff >> >> RETURN .vIWK >> >> >> >> At the R> prompt enter the following command to store this >> >> procedure in the database: >> >> >> >> PUT IWK.PRO AS IWK p1 DATE RETURN INTEGER >> >> >> >> To use this procedure you can do things like this: >> >> >> >> Example 01: >> >> >> >> SET VAR vWeek = (CALL IWK(.#DATE)) >> >> vWeek will return the value of 47 (based on 11/21/2001) >> >> STP_RETURN will also return the value of 47. >> >> >> >> Example 02: >> >> >> >> SET VAR vMyDate DATE = 04/19/2002 >> >> SET VAR vWeek = (CALL IWK(.vMyDate)) >> >> vWeek will return the value of 16 >> >> STP_RETURN will also return the value of 16 >> >> >> >> Additional Notes: >> >> >> >> The STP_RETURN is a system variable that contain the value >> >> returned by a Stored Procedure. This return value is set by >> >> using the RETURN command. The STP_RETURN variable will be >> >> whatever type is needed by the RETURN statement within the >> >> Stored Procedure. >> >> >> >> Enjoy the Power and Flexibility of R:BASE 2000 (ver 6.5)! >> >> >> >> --- >> >> >> >> Download PDF version of this article at: >> >> >> >> http://www.rbase.com/FromTheEdge/AddYourOwnFunctions.pdf >> >> >> >> Send your constructive comments to: mailto:[EMAIL PROTECTED] >> >> >> >> Very Best Regards, >> >> >> >> Razzak. >> >> >> >> ===================================-============================ >> >> Official R:BASE List Server: mailto:[EMAIL PROTECTED] >> >> RBTI Events/Training: http://www.rbase2000.com/events >> >> R:DCC Members: http://www.rbase2000.com/rdcc >> >> ================================================================ >> >> R:BASE, Oterro & R:Tango are registered trademarks of RBTI. >> >> ==================================-============================= >> >> >> >> >> > >> > >> > >> > > ===================================-============================ Official R:BASE List Server: mailto:[EMAIL PROTECTED] RBTI Events/Training: http://www.rbase2000.com/events R:DCC Members: http://www.rbase2000.com/rdcc ================================================================ R:BASE, Oterro & R:Tango are registered trademarks of RBTI. ==================================-=============================
