由于标识符太长,无法将值插入 localDB
Cannot insert values into localDB because of too long identifier
我正在使用 visual studio 2015 创建一个 localdb 项目。我想存储网页信息,包括:PageID、名称、标题、描述和 PublicFacing。
这是我的 table 的样子
这是我的插入语句
insert into dbo.Page(Name, Title, Description, PublicFacing) VALUES ("index", "My Website | Wholesale Prices", "Wholesale Prices, Products, Items, Gadget service provider. Delivering a management platform to ITSPs and resellers. You can get it all here", 1);
当我尝试 运行 这条语句时,出现以下错误:
The identifier that starts with 'Wholesale Prices, Products, Items, Gadget service provider. Delivering a management platform to ITSPs and resellers. You can get it all here' is too long. Maximum length is 128.
我想我困惑的原因是,我不知道为什么将其称为标识符。这是进入我的数据库的值,它低于我在 table 中设置的最大 varchar 限制。这是什么原因造成的?
在您的文本值周围使用单引号!
我正在使用 visual studio 2015 创建一个 localdb 项目。我想存储网页信息,包括:PageID、名称、标题、描述和 PublicFacing。
这是我的 table 的样子
这是我的插入语句
insert into dbo.Page(Name, Title, Description, PublicFacing) VALUES ("index", "My Website | Wholesale Prices", "Wholesale Prices, Products, Items, Gadget service provider. Delivering a management platform to ITSPs and resellers. You can get it all here", 1);
当我尝试 运行 这条语句时,出现以下错误:
The identifier that starts with 'Wholesale Prices, Products, Items, Gadget service provider. Delivering a management platform to ITSPs and resellers. You can get it all here' is too long. Maximum length is 128.
我想我困惑的原因是,我不知道为什么将其称为标识符。这是进入我的数据库的值,它低于我在 table 中设置的最大 varchar 限制。这是什么原因造成的?
在您的文本值周围使用单引号!