Mapowania typu danych usług sieci Web XML macierzystego
Ta funkcja zostanie usunięta z przyszłej wersji programu Microsoft SQL Server. Należy unikać stosowania tej funkcji w nowych projektach oraz zaplanować modyfikację aplikacji, w których obecnie jest używana ta funkcja.
W poniższej tabela przedstawiono mapowanie typów SQL do typów XSD.
Typ SQL |
Typ XSD |
Typ ograniczenia |
---|---|---|
BigInt |
xsd:long |
|
Binary |
xsd:base64Binary |
|
Bit |
xsd:boolean |
|
Char |
xsd:string |
|
DateTime |
xsd:dateTime |
<wartość xsd:pattern = "((000 [1-9]) | ()00 [1-9] [0-9]) |(0 [1-9] [0-9] {2}) |([1-9][0-9]{3}))-((0 [1-9]) |(1[0,1,2]))-((0 [1-9]) |([1,2] [0-9]) |(3[0,1]))T (([0,1] [0-9]) | ()2[0-3]))(:[0-5][0-9]) {2} (\. [0-9]{2}[0,3,7])?" /> <wartość xsd:MaxInclusive = "9999-12-31T23:59:59.997" /> <wartość xsd:MinInclusive = "1753-01-01T00:00:00.000" /> |
Decimal |
xsd:decimal |
|
Float(53) |
xsd:double |
|
GUID (same as UniqueIndentifier) |
xsd:string |
<wartość xsd:pattern = "([0-9a-fA-F] {8}-[0-9a-fA-F] {4}-[0-9a-fA-F] {4}-[0-9a-fA-F] {4}-[0-9a-fA-F] {12}) |(\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\})" /> |
Image |
xsd:base64Binary |
|
Int |
xsd:int |
|
Money |
xsd:decimal |
<wartość xsd:TotalDigits = "19" /> <wartość xsd:fractionDigits = "4" /> <wartość xsd:MaxInclusive = "922337203685477.5807" /> <xsd:minInclusive value="-922337203685477.5808"/> |
NChar |
xsd:string |
|
NText |
xsd:string |
|
Numeric |
xsd:decimal |
|
NVarChar |
xsd:string |
|
Real |
xsd:float |
|
SmallInt |
xsd:short |
|
SmallDateTime |
xsd:dateTime |
<wartość xsd:pattern = "((000 [1-9]) | ()00 [1-9] [0-9]) |(0 [1-9] [0-9] {2}) |([1-9][0-9]{3}))-((0 [1-9]) |(1[0,1,2]))-((0 [1-9]) |([1,2] [0-9]) |(3[0,1]))T (([0,1] [0-9]) | ()2[0-3]))(:[0-5][0-9])(:00)" /> <wartość xsd:MaxInclusive = "2079-06-06T23:59:00" /><xsd:minInclusive wartość = "1900-01-01T00" /> |
SmallMoney |
xsd:decimal |
<wartość xsd:TotalDigits = "10" /> <wartość xsd:fractionDigits = "4" /> <wartość xsd:MaxInclusive = "214748.3647" /><xsd:minInclusive wartość = "-214748.3648" /> |
Sql_Variant |
xsd:anyType |
|
Text |
xsd:string |
|
TimeStamp |
xsd:base64Binary(w SQL Server 2005 lub nowszej tryb zgodności); xsd:long(w SQL Server 2000 trybu zgodności) |
<xsd:maxLength>8</xsd:maxLength> |
TinyInt |
xsd:unsignedByte |
|
UDT (Styl CLR) |
xsd:base64Binary(w SQL Server 2005) |
Dodatkowe informacje na temat rzeczywistego typu znajduje się w obrębie faset. |
UDT (stary styl) |
Mapowane do oryginalnego typu podstawowego |
|
VarBinary |
xsd:base64Binary |
|
VarChar |
xsd:string |
|
XML |
xsd:any |
|
XML (wpisany) |
xsd:any |
Schemat XML do wpisany kod XML jest zwracany. |
Szczególne problemy typu danych do parametru faset w żądaniu protokołu SOAP
Podczas wysyłania żądania kwerend ad hoc można określić parametry.Określając parametrów, można również opcjonalnie dodać parametr faset.Te aspekty można określić na <SqlParameter> węzeł elementu lub <wartość> węzeł elementu podczas wysyłania żądania kwerend ad hoc.Aby uzyskać informacje dotyczące parametru faset, zobacz Struktura komunikatu żądania protokołu SOAP.
Jak tabela zawiera następujące xsi: type mapuje typy SQL.Należy zauważyć, że xsi: type jest jednym z faset, które można dodać do <wartość> węzeł elementu przy konstruowaniu żądanie protokołu SOAP.
Ostrzeżenie
Typy danych dodawane rozpoczynającego się w SQL Server 2008 nie są obsługiwane.
xsi: type |
Typ SQL |
---|---|
SqlTypes:bigint |
BigInt |
SqlTypes:Binary |
Binary |
SqlTypes:bit |
Bit |
SqlTypes:char |
Char |
SqlTypes:DateTime |
DateTime |
SqlTypes:decimal |
Decimal |
SqlTypes:float |
Float |
SqlTypes:Image |
Image |
SqlTypes:int |
Int |
SqlTypes:Money |
Money |
SqlTypes:nchar |
NChar |
SqlTypes:ntext |
NText |
SqlTypes:NUMERIC |
Numeric |
SqlTypes:nvarchar |
NVarChar |
SqlTypes:Real |
Real |
SqlTypes:smalldatetime |
SmallDateTime |
SqlTypes:smallint |
SmallInt |
SqlTypes:smallmoney |
SmallMoney |
SqlTypes:Text |
Text |
SqlTypes:Timestamp |
Timestamp |
SqlTypes:tinyint |
TinyInt |
SqlTypes:uniqueidentifier |
UniqueIdentifier |
SqlTypes:varbinary |
VarBinary |
SqlTypes:varchar |
VarChar |
SqlTypes:XML |
Xml |
xsd:anyType |
Xml |
xsd:boolean |
Bit |
xsd:DateTime |
DateTime |
xsd:decimal |
Decimal |
xsd:double |
Float |
xsd:float |
Real |
xsd:int |
Int |
xsd:Long |
BigInt |
xsd:Short |
SmallInt |
xsd:string |
NVarchar |
xsd:unsignedByte |
TinyInt |
xsd:base64Binary |
varbinary |
W poniższej tabela przedstawiono możliwe wartości SqlDbType aspekt, który można dodać do <SqlParameter> węzeł elementu podczas konstruowania żądania kwerend ad hoc.
BigInt |
SmallDateTime |
Binary |
SmallInt |
Bit |
SmallMoney |
Char |
Text |
DateTime |
Timestamp |
Decimal |
TinyInt |
Float |
Udt |
Image |
UniqueIdentifier |
Int |
VarBinary |
Money |
VarChar |
NChar |
Variant |
NText |
Xml |
NVarChar |
|
Real |