Platforms to show: All Mac Windows Linux Cross-Platform

Back to SQLGlobalsMBS class.

SQLGlobalsMBS.FindTableName(SQL as String) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries table name used in a SQL SELECT statement.
Example
Dim sql As String = "SELECT First, Last FROM MyTable WHERE ID = 1"
Dim TableName As String = SQLGlobalsMBS.FindTableName(sql)

MessageBox TableName // shows MyTable

This is a helper function used by our Edit/Update methods in RecordSet.
Returns either the found table name or empty text if something got wrong. e.g. multiple tables affected due to JOIN operation.

If you find a case where the parser crashes or reports wrong result, please contact us.

SQLGlobalsMBS.GetEnv(name as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries environment variable.

Returns empty string if variable is undefined.

SQLGlobalsMBS.GetVersion as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The version string of the SQLAPI library.

SQLGlobalsMBS.GetVersionBuild as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The build number of the SQLAPI library.

SQLGlobalsMBS.GetVersionMajor as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The major version number of the SQLAPI library.

SQLGlobalsMBS.GetVersionMinor as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The minor version number of the SQLAPI library.

SQLGlobalsMBS.PutEnv(line as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets environment variable.

Line format should be "key=value" and returns true on success and false on failure.

SQLGlobalsMBS.RaiseException(message as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Raises an exception to test exception handling in SQL Plugin.

Raises directly a SQLErrorExceptionMBS with the given message.

SQLGlobalsMBS.RaiseSQLErrorException(UserCode as Integer, message as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Raises an exception to test exception handling in SQL Plugin.

Raises a SAUserException which the plugin catches and translates to a SQLErrorExceptionMBS in Xojo.

Some examples using this method:

SQLGlobalsMBS.SetCurrentWorkingDirectory(path as folderitem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 16.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the current working directory.

This is often useful to make sure the DLLs in that folder are found.

See also:

SQLGlobalsMBS.SetCurrentWorkingDirectory(path as String) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 16.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the current working directory.

This is often useful to make sure the DLLs in that folder are found.

See also:

SQLGlobalsMBS.SetEnv(name as string, value as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets an environment variable.

Existing variable with same name will be overwritten.
Returns true on success and false on failure.

SQLGlobalsMBS.SetLicenseCode(n as string, enddate as Integer, v1 as Integer, v2 as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Registeres the SQL plugin and library.

Once you ordered a license, you receive details on how to call this method.

SQLGlobalsMBS.Setlocale(category as Integer, locale as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 10.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the locale to use.
Example
// ask for English for USA with 1252 codepage
SQLGlobalsMBS.Setlocale SQLGlobalsMBS.LocaleAll, "English_United States.1252"

The Setlocale function sets the C library's notion of natural language formatting style for particular sets of routines. Each such style is called a 'locale' and is invoked using an appropriate name passed as a C string.

The setlocale() function recognizes several categories of routines. These are the categories and the sets of routines they select:

LocaleAllSet the entire locale generically.
LocaleCollateSet a locale for string collation routines. This controls alphabetic ordering in strcoll() and strxfrm().
LocaleCTypeSet a locale for the ctype and multibyte functions. This controls recognition of upper and lower case, alphabetic or non-alphabetic characters, and so on.
LocaleMessagesSet a locale for message catalogs, see catopen function.
LocaleMonetarySet a locale for formatting monetary values; this affects the localeconv() function.
LocaleNumericSet a locale for formatting numbers. This controls the formatting of decimal points in input and output of floating point numbers in functions such as printf() and scanf(), as well as values returned by localeconv().
LocaleTimeSet a locale for formatting dates and times using the strftime() function.

Only three locales are defined by default: the empty string "" (which denotes the native environment) and the "C" and "POSIX" locales (which denote the C-language environment). By default, C programs start in the "C" locale.

SQLGlobalsMBS.UnInitialize

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Explicitly shutdown SQL engine.

You can call this in App Close or Destructor, but only after you destroyed all Connections, e.g. all SQLDatabaseMBS and SQLConnectionMBS objects.

SQLGlobalsMBS.UnSetEnv(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SQL MBS SQL Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes environment variable.

Returns true on success and false on failure.

Some examples using this method:

The items on this page are in the following plugins: MBS SQL Plugin.


The biggest plugin in space...