Since I want to point you to a couple of special features relating to the data types of SQL Server CE just with the SQL Server Compact Edition work.
Because with the Compact Edition unfortunately lacks some datatypes in the express as well as the fee-based SQL Server - versions are available.
Peculiarities with regard to the Visual Studio and the Compact Edtion I'm in a different article explaining further.
A practical introduction for this you will find in my video tutorial: Vb.net and SQL Server Compact Edition
Different data types
Observance of the various data types is important both for creating tables, but also for the behavior of the server when replicating.
Besides, it can especially when moving an application from a "real" SQL Server application on a compact variant lead to increased problems (this I recommend you to read the above-mentioned article).
The following table, which also takes you on one of the MSDN Web sites of Microsoft, shows the data type mappings that are executed when replicating between SQL Server and Microsoft SQL Server Compact Edition.
It lists the assignments of the SQL Server data types and describes limitations and special behaviors.
SQL Server data type
|
Datatype of SQL Server Compact Edition
|
bigint
|
bigint
|
binary(n)
|
binary(n)
|
bit
|
bit
|
character(n)(Synonym:char(n))
|
national character(n) – Oder – ntext
If the character length is a maximum of 4000 characters that SQL Server are character -data by the SQL Server Compact Edition Replication SQL Server Compact Edition national characterassigned. Otherwise, the character data, SQL Server Compact Edition will ntext assigned. If the length of the ntext -data the length of the character exceeds column, the synchronization signals while sending data from SQL Server Compact Edition to SQL Server returns an error.
|
character varying(n)(Synonym: varchar(n))
|
national character varying – Oder – ntext
If the character length is a maximum of 4,000 characters, the SQL Server character varying from the SQL Server Compact Edition Replication SQL Server Compact Edition -data national character varying assigned. Otherwise, the character varying data SQL Server Compact Edition will ntext assigned. If the length of thentext -data the length of the character varying exceeds column, the synchronization signals while sending data from SQL Server Compact Edition to SQL Server returns an error.
|
character varying(MAX)(Synonym:varchar(MAX))
|
ntext
If the length of the character varying (MAX) -data the length of the ntext column exceeds that synchronization signals while sending data from SQL Server to SQL Server Compact Edition an error.
|
Computed Columns
|
is not supported.
If you use and indicate that SQL Server Compact Edition subscriptions will use the Publication Wizard, each column of the data type Computed Column partitioned vertically from the publication. If you do not use the wizard, you must exclude columns of this data type in the publication.
|
datetime
|
datetime
|
decimal
|
is not supported. Please use Numeric.
|
double precision
|
double precision
|
float
|
float
|
image
|
image
|
integer(Synonym: int)
|
integer
|
money
|
money
|
national character(n)(Synonym: nchar(n))
|
national character(n)
|
national character varying(n)(Synonym:nvarchar(n))
|
national character varying(n)
|
national character varying(MAX)(Synonym:nvarchar(MAX))
|
ntext
If the length of the national character varying (MAX) -data the length of the ntext column exceeds that synchronization signals while sending data from SQL Server to SQL Server Compact Edition an error.
|
ntext
|
ntext
|
numeric(Synonyme:decimal, dec)
|
numeric
|
real
|
real
|
smalldatetime
|
datetime
If the accuracy of the datetime data indicates accuracy ofsmalldatetime exceeds column, the synchronization signals while sending data from SQL Server Compact Edition to SQL Server returns an error.
|
smallint (int 2)
|
smallint (int 2)
|
smallmoney
|
money
If the accuracy of the money -data the accuracy of smallmoneyexceeds column, the synchronization signals while sending data from SQL Server Compact Edition to SQL Server returns an error.
|
sql_variant
|
ntext
If in the sql_variant column are available binary data, this binary data must consist of an even number of bytes. Otherwise, there is a conversion error.
|
text
|
ntext
If the length of the text -data exceeds 1,073,741,823 characters, synchronization signals while sending data from SQL Server to SQL Server Compact Edition an error.
|
timestamp
|
Unsupported.
If you are using Publication Wizard and angibst that SQL Server Compact Edition subscriptions are used, each column of data typetimestamp partitioned vertically from the publication. If you do not use the wizard, you must exclude columns of this data type in the publication.
|
tinyint
|
tinyint
|
uniqueidentifier
|
uniqueidentifier
|
varbinary(n)
|
varbinary(n)
|
varbinary(MAX)
|
image
If the length of the varbinary (MAX) data indicates the length of the image exceeds column, the synchronization signals while sending data from SQL Server to SQL Server Compact Edition an error.
|
varchar
|
See character deviation
|
XML
|
ntext
|
0 comments:
Post a Comment