Query
Method used to return data from the database.
Note:
- Added optional poIsNull parameter with datatype appropriate default values.
- Added logic to check for a query null result to return the parameter if provided, or throw an exception with a custom message providing the query text with parameters, and what was expected and how to protect against it.
- Added utility method GetQueryWithParameters() to iterate through parameters List and replace parameter placeholders in the query text.
- Added attributes to GetInt() to show this method is deprecated and ExcludedFromScripting IDE.
Applies To
None
Properties and Methods
Properties
- .CompanyDatabase
- .DocumentDatabase
- .Engine
- .SystemDatabase
Methods
- .AddParameter(Value)
- .ClearParameters()
- .GetBoolean(Query[, IsNull])
-
Script.GetDataTable(TableName).GetRow(X).GetDateTime(Column) show more
- .Day
- .DaylightSavings
- .DayOfWeek
- .DayOfYear
- .Hour
- .ISOString
- .LongDateString
- .LongTimeString
- .Minute
- .Month
- .Second
- .ShortDateString
- .ShortTimeString
- .Year
- .AddDays(Days)
- .AddHours(Hours)
- .AddMinutes(Minutes)
- .AddMonths(Months)
- .AddSeconds(Seconds)
- .AddYears(Years)
- .Copy()
- .StringDayOfWeek([Culture])
- .StringMonth([Culture])
- .GetDecimal(Query[, IsNull])
- .GetInteger(Query[, IsNull])
- .GetString(Query[, IsNull])
-
.GetTable(Query)
- .Columns
- .Count
- .AddBooleanColumn(Name)
- .AddDateTimeColumn(Name)
- .AddDecimalColumn(Name)
- .AddIntegerColumn(Name)
-
Script.GetDataTable(TableName).AddRow([IDColumn]) show more
- .CopyFrom(From)
- .GetBoolean(Column)
-
Script.GetDataTable(TableName).GetRow(X).GetDateTime(Column) show more
- .Day
- .DaylightSavings
- .DayOfWeek
- .DayOfYear
- .Hour
- .ISOString
- .LongDateString
- .LongTimeString
- .Minute
- .Month
- .Second
- .ShortDateString
- .ShortTimeString
- .Year
- .AddDays(Days)
- .AddHours(Hours)
- .AddMinutes(Minutes)
- .AddMonths(Months)
- .AddSeconds(Seconds)
- .AddYears(Years)
- .Copy()
- .StringDayOfWeek([Culture])
- .StringMonth([Culture])
- .GetDecimal(Column)
- .GetInteger(Column)
- .GetString(Column)
- .SetBoolean(Column, Val)
- .SetDateTime(Column, Val)
- .SetDecimal(Column, Val)
- .SetInteger(Column, Val)
- .SetString(Column, Val)
- .AddStringColumn(Name)
-
.GetMaximumDateTime(ColName) show more
- .Day
- .DaylightSavings
- .DayOfWeek
- .DayOfYear
- .Hour
- .ISOString
- .LongDateString
- .LongTimeString
- .Minute
- .Month
- .Second
- .ShortDateString
- .ShortTimeString
- .Year
- .AddDays(Days)
- .AddHours(Hours)
- .AddMinutes(Minutes)
- .AddMonths(Months)
- .AddSeconds(Seconds)
- .AddYears(Years)
- .Copy()
- .StringDayOfWeek([Culture])
- .StringMonth([Culture])
- .GetMaximumDecimal(ColName)
- .GetMaximumInteger(ColName)
-
.GetMinimumDateTime(ColName) show more
- .Day
- .DaylightSavings
- .DayOfWeek
- .DayOfYear
- .Hour
- .ISOString
- .LongDateString
- .LongTimeString
- .Minute
- .Month
- .Second
- .ShortDateString
- .ShortTimeString
- .Year
- .AddDays(Days)
- .AddHours(Hours)
- .AddMinutes(Minutes)
- .AddMonths(Months)
- .AddSeconds(Seconds)
- .AddYears(Years)
- .Copy()
- .StringDayOfWeek([Culture])
- .StringMonth([Culture])
- .GetMinimumDecimal(ColName)
- .GetMinimumInteger(ColName)
-
.GetRow(X) show more
- .CopyFrom(From)
- .GetBoolean(Column)
- .GetDateTime(Column)
- .GetDecimal(Column)
- .GetInteger(Column)
- .GetString(Column)
- .SetBoolean(Column, Val)
- .SetDateTime(Column, Val)
- .SetDecimal(Column, Val)
- .SetInteger(Column, Val)
- .SetString(Column, Val)
- .RemoveRow(Row)
- .SetNextIDValue(IDColumn, Row)
- .GetUserFieldValue(UserField, RecordID[, GroupID, GetID])
- .SetParameters(Params)
- .SetUserFieldValue(UserFeild, RecordID, Value[, GroupID])
Available
The Query object is available in:
- 15.03.016
- All newer builds
Type
Object
Syntax
Query;
Parameters
None
Example
There is never a point in time where Query would be used on its own.