Support > Database usage guide (R7) > Type of database > SQLServer 2005/2008/2012/2014
ja | en

It shows notes on using SQLServer.

The type specified by Wagby is handled as follows in the database.

Integer type int
String type nvarchar(255)
String type (text area) nvarchar(1000)
Date type datetime
Time type datetime
Date Time Type datetime
File type (file name) nvarchar(255)
1 byte integer tinyint
2 byte integer smallint
4 byte integer int
8 byte integer numeric(19,0)
4 byte floating point number float
8 byte floating point number double precision
Fixed value (creation date / update date) datetime
Other (URL type / mail address type etc.) nvarchar(255)
  • For model reference, it follows the type of the primary key of the referenced model.
  • Developers can also change the type.For details, refer to "Repository> Definition of model item> Database detailsPlease read.
The string type uses nvarchar.When specifying with varchar type, it is in bytes unit.For details, please refer to the SQLServer manual.

Confirm that TCP / IP is enabled

In order to connect with JDBC, TCP / IP must be enabled.

How to specify URL

When installing SQL Server 2005, when installing with a named instance, you need to specify the instance name or the port number on which the instance is running in the database connection url.

In "default instance" 1433 / tcp, "named instance" dynamically assigns an unused TCP port number the first time the instance is started up.

Example) When installing SQL Server 2005 Express Edition

url="jdbc:sqlserver://192.168.6.75\SQLEXPRESS;databasename=sampledb"

Or

url="jdbc:sqlserver://192.168.6.75:1433;databasename=sampledb"

You specify.(Please replace "192.168.6.75" which is the IP address part of the above example appropriately according to your LAN environment.)

For string type items, use nvarchar prepared by SQL Server.By using nvarchar, you can also store "Oga's Old Kanji" and surrogate pair characters (eg fish hockey: fish flowers).

If you want to use it as varchar,Type of table definitionPlease specify.

The influence of operation due to the difference between varchar and nvarchar is that the collation order (order of sorting) is changed.This is double-byte character limited, and the sort order of half-width characters is immutable.