BaseTools-0.0.5

Extension:
Extension ID:
vnd.robertobenitez.basetools
Release date:
08/09/2010 - 21:07
Version:
0.0.5
Operating system:
System Independent
Compatibility:
3.4
Binary type:
OOo extension (.oxt)
Release Notes: 

Made a couple of changes:

  1. Extended RunCmd.RunSQL function to run an SQL function call (e.g. CALL SOUNDEX('HELLO') ). Such an SQL statement would return a resultset with one record, which has one column--the result of the function call.
  2. Added RunCmd.SqlFunction(SQL_Function_Name[(params)]) which is similar to RunSQL, but returns the single value in row 1, column 1 of resultset produced by function call. The parameter can be a full SQL statement (e.g. CALL SOUNDEX('HELLO') ), or just the function name with any necessary parameters (e.g. SOUNDEX('HELLO') )

Example:

GlobalScope.BasicLibraries.LoadLibrary("BaseTools")

Phrase="Hello OpenOffice.org World"
PhraseArr=Split(Phrase," ")
PhraseSound=""
SqlFunc="SOUNDEX('?')"
For I=0 To UBound(PhraseArr)
sTmp=Replace(SqlFunc,"?",PhraseArr(I))
PhraseSound=PhraseSound & " " & RunCmd.SqlFunction(sTmp)
Next I
MsgBox "The Sound of [ " & Phrase & " ] IS " & PhraseSound