Class QSqlServer2005Database
Database Adapter for Microsoft SQL Server 2005/2008
LimitInfo and Query utilizes an interal SQL tag QCUBED_OFFSET<#>, where # represents the number of rows to offset for "Limit"-based queries. The QCUBED_OFFSET is added internally by SqlLimitVariablePrefix(), and it is handled (and removed from the query) by Query(). In error messages and DB profiling, the QCUBED_OFFSET<#> tag WILL appear (if applicable). The framework will handle this gracefully, but obviously, if you try and cut and paste SQL code that contains QCUBED_OFFSET<#> into QueryAnalyzer, the query will fail, so just be aware of that. If you want to do something like test queries with QueryAnalyzer, just remember to manually remove any QCUBED_OFFSET<#> information.
ENHANCEMENTS over MSSQL based-driver: - varchar limit of 254 characters no longer exists, uses full varchar(8000) - supports different date formats - faster
DATE VALUES: If the date format of your database is different from the standard english format of 'YYYY-MM-DD hhhh:mm:ss' you have to declare it by setting the option 'dateformat' in the database connection array in the configuration.inc.php. For instance if your database wants german date settings you would set it to 'DD.MM.YYYY hhhh:mm:ss'.
LIMITATIONS: - GROUP BY Using GROUP BY clause is broken because: a) Current QQuery implementation is MySQL specific. Standard SQL wants every column in the SELECT statement, that is not an aggregate statement, in the GROUP BY clause and this behaviour is currently not supported. This limitation is valid too for the MSSQL based adapter.
- Datatypes currently not fully supported sql_variant, varbinary(max), geometry, geography, hierarchyid, uniqueidentifier
- QBaseClass
- QDatabaseBase
- QSqlServer2005Database
Copyright: Copyright (C) 2009,2010 Andreas Krohn
License: http://www.opensource.org/licenses/mit-license.php
Author: Andreas Krohn akrohn.pronet@googlemail.com, based on code by Mike Ho
Located at includes/database/QSqlServer2005Database.class.php
public
string
|
#
SqlVariable( mixed $mixData, boolean $blnIncludeEquality = false, boolean $blnReverseEquality = false )
Properly escapes $mixData to be used as a SQL query parameter. If IncludeEquality is set (usually not), then include an equality operator. So for most data, it would just be "=". But, for example, if $mixData is NULL, then most RDBMS's require the use of "IS". |
public
|
|
public
|
|
public
|
|
public
|
|
public
mixed
|
|
protected
mixed
|
#
ExecuteQuery( string $strQuery )
Sends a SQL query for execution to the database In this regard, a query is a 'SELECT' statement |
protected
mixed
|
#
ExecuteNonQuery( string $strNonQuery )
Sends a non-SELECT query (such as INSERT, UPDATE, DELETE, TRUNCATE) to DB server. In most cases, the results of this function are not used and you should not send 'SELECT' queries using this method because a result is not guaranteed to be returned |
public
mixed|string[]
|
|
public
|
|
public
mixed
|
|
public
mixed
|
|
public
mixed
|
|
protected
|
|
protected
|
|
protected
|
|
public
mixed
|
|
public
mixed
|
OverrideAttributes(),
__call()
|
Adapter
|
protected
|
$objSqlSrvConn
|
|
protected
|
$objMostRecentStatement
|
|
protected
string
|
$strEscapeIdentifierBegin
The beginning part of characters which can escape identifiers in a SQL query for the database |
#
'['
|
protected
string
|
$strEscapeIdentifierEnd
The ending part of characters which can escape identifiers in a SQL query for the database |
#
']'
|
protected
boolean
|
$blnOnlyFullGroupBy
|
#
true
|
protected
array
|
$mixedOptionsArray
|
#
array(
)
|
$blnConnectedFlag,
$blnEnableProfiling,
$intDatabaseIndex,
$intTransactionDepth,
$objCacheProviderStack,
$objConfigArray,
$strProfileArray
|
$Adapter,
$AffectedRows,
$Caching,
$Database,
$DatabaseIndex,
$DateFormat,
$EnableProfiling,
$EscapeIdentifierBegin,
$EscapeIdentifierEnd,
$Host,
$OnlyFullGroupBy,
$Password,
$Port,
$Profile,
$Protocol,
$Server,
$Service,
$Username
|